Bug 5917 : Converted templates
[koha.git] / koha-tt / intranet-tmpl / prog / en / modules / acqui / basket.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for [% name %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% UNLESS ( closedate ) %]
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6 <script type="text/JavaScript">
7 //<![CDATA[
8     $(document).ready(function() {
9         $("#orders").tablesorter({
10             headers: {
11                 9: { sorter: false },
12                 10: { sorter: false }
13             }
14         });
15     });
16 //]]>
17 </script>
18 <script type="text/javascript">
19 //<![CDATA[
20             function confirm_close() {
21                 var is_confirmed = confirm(_('Are you sure you want to close this basket?'));
22                 if (is_confirmed) {
23                     window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
24                 }
25             }
26 //]]>
27         </script>
28 <script type="text/javascript">
29 //<![CDATA[
30             function confirm_deletion() {
31                 var is_confirmed = confirm(_('Are you sure you want to delete this basket?'));
32                 if (is_confirmed) {
33                     window.location = "[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]";
34                 }
35             }
36 //]]>
37 </script>
38 [% ELSE %]
39 [% UNLESS ( grouped ) %]
40 <script type="text/javascript">
41 //<![CDATA[
42             function confirm_reopen() {
43                 var is_confirmed = confirm(_('Are you sure you want to reopen this basket?'));
44                 if (is_confirmed) {
45                     window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
46                 }
47             }
48 //]]>
49 </script>
50 [% END %]
51 [% END %]
52 <style type="text/css">
53 .sortmsg {font-size: 80%;}
54 </style>
55 </head>
56 <body>
57 [% INCLUDE 'header.inc' %]
58 [% INCLUDE 'acquisitions-search.inc' %]
59
60
61 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% name %]</a> &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for [% name %]</div>
62
63 <div id="doc3" class="yui-t2">
64
65 <div id="bd">
66     <div id="yui-main">
67     <div class="yui-b">
68         [% UNLESS ( confirm_close ) %]
69         [% UNLESS ( selectbasketg ) %]
70             [% UNLESS ( closedate ) %]
71                 <div id="toolbar">
72                     <script type="text/javascript">
73                         //<![CDATA[
74                         // prepare DOM for YUI Toolbar
75                         $(document).ready(function() {
76                             yuiToolbar();
77                         });
78                         // YUI Toolbar Functions
79                         function yuiToolbar() {
80                             [% IF ( unclosable ) %]
81                                 new YAHOO.widget.Button("closebutton", {disabled:true});
82                             [% ELSIF ( uncertainprices ) %]
83                                 new YAHOO.widget.Button("uncertpricesbutton");
84                             [% ELSE %]
85                                 new YAHOO.widget.Button("closebutton");
86                             [% END %]
87                             new YAHOO.widget.Button("basketheadbutton");
88                             new YAHOO.widget.Button("exportbutton");
89                             new YAHOO.widget.Button("delbasketbutton");
90                         }
91                         //]]>
92                     </script>
93
94                     <ul id="toolbar-list" class="toolbar">
95                     <li><a href="basketheader.pl?basketno=[% basketno %]&amp;op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
96                     <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li>
97                     [% IF ( unclosable ) %]
98                         <li><button onclick="confirm_close()" class="yui-button-disabled" id="closebutton" type="button" disabled="disabled" title="You can not close this basket">Can not close basket</button></li>
99                     [% ELSIF ( uncertainprices ) %]
100                         <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
101                     [% ELSE %]
102                         <li><a href="[% script_name %]?op=close&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="button" id="closebutton">Close this basket</a></li>
103                     [% END %]
104                         <li><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="button" id="exportbutton">Export this basket as CSV</a></li>
105                     </ul>
106
107                 </div>
108             [% ELSE %]
109                 [% UNLESS ( grouped ) %]
110                 <div id="toolbar">
111                     <script type="text/javascript">
112                         //<![CDATA[
113                         // prepare DOM for YUI Toolbar
114                         $(document).ready(function() {
115                             yuiToolbar();
116                         });
117                         // YUI Toolbar Functions
118                         function yuiToolbar() {
119                             new YAHOO.widget.Button("reopenbutton");
120                         }
121                         //]]>
122                     </script>
123                         <ul id="toolbar-list" class="toolbar">
124                             <li><a href="javascript:confirm_reopen();" class="button" id="reopenbutton">Reopen this basket</a></li>
125                         </ul>
126                 </div>
127                 [% END %]
128             [% END %]
129             [% END %]
130
131     [% IF ( NO_BOOKSELLER ) %]
132     <h2>Vendor not found</h2>
133     [% ELSE %]
134         [% IF ( delete_confirmed ) %]
135             <h3>Basket deleted</h3>
136             <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
137         [% ELSE %]
138         <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname %] ([% basketno %]) for <a href="supplier.pl?supplierid=[% booksellerid %]">[% name %]</a></h1>
139         [% IF ( delete_confirm ) %]
140             <h2>
141             <span class="yui-button yui-link-button">
142             <em class="first-child">
143                 <a href="[% script_name %]?op=delete_confirm&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a>
144             </em>
145             </span>
146             <span class="yui-button yui-link-button">
147             <em class="first-child">
148                 <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a>
149             </em>
150             </span>
151             </h2>
152         [% END %]
153         [% IF ( basketno ) %]
154             <div id="acqui_basket_summary"  class="yui-g">
155                 <h2>Basket details</h2>
156                 [% IF ( basketnote ) %]<p>Internal note: [% basketnote %]</p>[% END %]
157                 [% IF ( basketbooksellernote ) %]<p>Vendor note: [% basketbooksellernote %]</p>[% END %]
158                 [% IF ( basketcontractno ) %]
159                     <p>Contract name: <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></p>
160                 [% END %]
161                 [% IF ( authorisedbyname ) %]<p>Managed by:  [% authorisedbyname %]</p>[% END %]
162                 [% IF ( creationdate ) %]<p>Opened on:  [% creationdate %]</p>[% END %]
163                 [% IF ( closedate ) %]
164                 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
165                 <p>Closed on:  [% closedate %]</p>
166                 [% IF ( basketgroups ) %]
167                     <p> Basket group: <select id="basketgroupid" name="basketgroupid">
168                         [% FOREACH basketgroup IN basketgroups %]
169                             [% IF ( basketgroup.default ) %]
170                             <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
171                             [% ELSE %]
172                             <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
173                             [% END %]
174                         [% END %]
175                         </select>
176                         <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
177                         <input type="hidden" value="mod_basket" name="op" />
178                         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
179                         <input type="submit" value="Change basket group" />
180                     </p>
181                 </form>
182                 [% ELSE %]
183                     <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&amp;booksellerid=[% basketgroups %]&amp;basketgroupid=[% id %]">[% name %]</a>
184                 [% END %]
185                 [% END %]
186             </div>
187         [% END %]
188
189         [% UNLESS ( delete_confirm ) %]
190         <div id="acqui_basket_content">
191         <h2>Order Details</h2>
192         [% IF ( books_loop ) %]
193             <table id="orders">
194                 <thead>
195                     <tr>
196                         <th>Order</th>
197                         <th>RRP</th>
198                         <th>Est.</th>
199                         <th>Qty.</th>
200                         <th>Total</th>
201                         <th>Fund</th>
202                         [% IF ( active ) %]
203                             [% UNLESS ( closedate ) %]
204                                 <th>Modify</th>
205                                 <th>Delete</th>
206                             [% END %]
207                         [% END %]
208                     </tr>
209                 </thead>
210                 <tfoot>
211                 [% IF ( GST ) %]
212                 <tr>
213                     <th>Total Tax Exc.</th>
214                     <th>[% total_rrp_gste %]</th>
215                     <th>&nbsp;</th>
216                     <th>[% qty_total %]</th>
217                     <th>[% total_est_gste %]</th>
218                         [% IF ( active ) %]
219                             [% IF ( closedate ) %]
220                             <td colspan="1" rowspan="3">&nbsp;</td>
221                             [% ELSE %]
222                             <td colspan="3" rowspan="3">&nbsp;</td>
223                             [% END %]
224                         [% END %]
225                 </tr>
226                 <tr>
227                     <th>Tax ([% gist_rate %])</th>
228                     <th>[% gist_rrp %]</th>
229                     <th>&nbsp;</th>
230                     <th>&nbsp;</th>
231                     <th>[% gist_est %]</th>
232                 </tr>
233                 <tr>
234                     <th>Total Tax Inc. ([% currency %])</th>
235                     <th>[% total_rrp_gsti %]</th>
236                     <th>&nbsp;</th>
237                     <th>[% qty_total %]</th>
238                     <th>[% total_est_gsti %]</th>
239                 </tr>
240                 [% ELSE %]
241                 <tr>
242                     <th>Total ([% currency %])</th>
243                     <th>[% total_rrp_gsti %]</th>
244                     <th>&nbsp;</th>
245                     <th>[% qty_total %]</th>
246                     <th>[% total_est_gsti %]</th>
247                 </tr>
248                 [% END %]
249                 </tfoot>
250                 <tbody>
251                 [% FOREACH books_loo IN books_loop %]
252                     [% IF ( books_loo.order_received ) %]<tr class="disabled">[% ELSE %][% IF ( books_loo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %][% END %]
253                         <td>
254                             <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
255                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
256                                     [% IF ( books_loo.notes ) %] [% books_loo.notes %][% END %]
257                                     [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
258                                     [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
259                                     [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
260                             </p>
261                             </td>
262                         <td class="number">[% books_loo.rrp %]</td>
263                         <td class="number">[% books_loo.ecost %]</td>
264                         <td class="number">[% books_loo.quantity %]</td>
265                         <td class="number">[% books_loo.line_total %]</td>
266                         <td>[% books_loo.budget_name %]</td>
267                         [% IF ( books_loo.active ) %]
268                             [% UNLESS ( books_loo.closedate ) %]
269                             <td>
270                                 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&amp;booksellerid=[% books_loo.booksellerid %]&amp;basketno=[% books_loo.basketno %]">Modify</a>
271                             </td>
272                             <td>
273                             <a href="addorder.pl?ordernumber=[% books_loo.ordernumber %]&amp;basketno=[% books_loo.basketno %]&amp;quantity=0&amp;biblionumber=[% books_loo.biblionumber %]">Delete</a>
274                             </td>
275                             [% END %]
276                         [% END %]
277                     </tr>
278                 [% END %]
279                 </tbody>
280             </table>
281         [% ELSE %]
282             <table>
283                 <tr><td>Basket empty</td></tr>
284             </table>
285         [% END %]
286         [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
287         [% END %]
288         </div>
289         <br />
290         [% UNLESS ( closedate ) %]
291         [% INCLUDE 'acquisitions-add-to-basket.inc' %]
292         [% END %]
293         [% END %]
294 [% END %]
295 [% END %]    [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
296     [% END %]
297 [% IF ( confirm_close ) %]
298         <div id="closebasket_needsconfirmation" class="dialog alert">
299
300         <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
301             <h1>Are you sure you want to close basket [% basketname %]?</h1>
302             <p>
303             <label for="createbasketgroup">create a purchase order now?</label>
304             <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
305             </p>
306             <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
307             <input type="hidden" value="close" name="op" />
308             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
309             <input type="hidden" name="confirm" value="1" />
310             <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
311             <input type="submit" class="approve" value="Yes, Close (Y)" accesskey="y" />
312             <input type="submit" class="deny" value="No, Don't Close (N)" accesskey="n" onclick="javascript:window.location='/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]';return false;" />
313         </form>
314         </div>
315     [% END %]
316
317
318
319 </div>
320 </div>
321 <div class="yui-b">
322 [% INCLUDE 'acquisitions-menu.inc' %]
323 </div>
324 </div>
325 [% INCLUDE 'intranet-bottom.inc' %]