Bug 7791: (follow-up) adjust wording of basket deletion confirmation dialog
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basket.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript">
8 //<![CDATA[
9     function updateColumnsVisibility(visible) {
10         if ( visible ) {
11             $("table .gste, .gsti").show();
12         } else {
13             [% IF ( listincgst ) %]
14                 $("table .gste").hide();
15             [% ELSE %]
16                 $("table .gsti").hide();
17             [% END %]
18         }
19     }
20
21     $(document).ready(function() {
22         $("#show_all_details").click(function(){
23             updateColumnsVisibility($(this+":checked").val());
24         });
25
26         $("#show_all_details").attr('checked', false);
27         updateColumnsVisibility(false);
28         [% UNLESS ( closedate ) %]
29             $('#addtoBasket').on('show', function () {
30                $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
31             });
32         [% END %]
33     });
34 //]]>
35 </script>
36
37 [% UNLESS ( closedate ) %]
38 <script type="text/javascript">
39 //<![CDATA[
40             function confirm_close() {
41                 var is_confirmed = confirm(_("Are you sure you want to close this basket?"));
42                 if (is_confirmed) {
43                     window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
44                 }
45             }
46
47             function delete_basket(basketno,booksellerid,delbiblio) {
48                 window.location = "[% script_name %]?op=delete_confirm&delbiblio="+delbiblio+"&basketno="+basketno+"&booksellerid="+booksellerid;
49             }
50
51             function confirm_delete_item(ordernumber, biblionumber) {
52                 var is_confirmed = confirm(_("Are you sure you want to delete this order ?"));
53                 if (is_confirmed) {
54                     window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
55                 }
56             }
57
58             function confirm_delete_biblio(ordernumber, biblionumber) {
59                 var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?"));
60                 if (is_confirmed) {
61                     window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
62                     }
63             }
64
65             function transfer_order_popup(ordernumber) {
66                 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
67                     + "ordernumber=" + ordernumber
68                 window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
69             }
70
71 //]]>
72 </script>
73 [% ELSE %]
74 <script type="text/javascript">
75 //<![CDATA[
76     $(document).ready(function(){
77         $("#basketgroupid").change(function(){
78             if($(this).val() == "new"){
79                 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
80             }
81         });
82     });
83 //]]>
84 </script>
85 [% UNLESS ( grouped ) %]
86 <script type="text/javascript">
87 //<![CDATA[
88             function confirm_reopen() {
89                 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
90                 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
91                 if (is_confirmed) {
92                     window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
93                 }
94             }
95 //]]>
96 </script>
97 [% END %]
98 [% END %]
99 <script type="text/javascript">
100 //<![CDATA[
101     $(document).ready(function() {
102         var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
103             "sPaginationType": "four_button",
104             [% IF ( active ) %]
105               [% UNLESS ( closedate ) %]
106                 "aoColumnDefs": [
107                     { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
108                 ],
109               [% END %]
110             [% END %]
111         } ) );
112         var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
113             "sPaginationType": "four_button"
114         } ) );
115         $("#reopenbutton").on("click",function(e){
116             e.preventDefault();
117             confirm_reopen();
118         });
119     });
120
121     function basketUserSearchPopup(f) {
122         window.open(
123             "/cgi-bin/koha/acqui/aqbasketuser_search.pl",
124             'BasketUserSearchPopup',
125             'width=740,height=450,toolbar=no,'
126          );
127     }
128
129     function add_basket_user(borrowernumber, borrowername) {
130         var ids = $("#basketusers_ids").val();
131         if(ids.length > 0) {
132             ids = ids.split(':');
133         } else {
134             ids = new Array;
135         }
136         if (ids.indexOf(borrowernumber) < 0) {
137             ids.push(borrowernumber);
138             $("#basketusers_ids").val(ids.join(':'));
139             var li = '<li id="user_'+borrowernumber+'">'+borrowername
140                 + ' [<a style="cursor:pointer" onclick="del_basket_user('+borrowernumber+');">'
141                 + _("Delete user") + '</a>]</li>';
142             $("#basketusers_names").append(li);
143             return 0;
144         }
145         return -1;
146     }
147
148     function del_basket_user(borrowernumber) {
149       $("#user_"+borrowernumber).remove();
150       var ids = $("#basketusers_ids").val().split(':');
151       ids.splice(ids.indexOf(borrowernumber.toString()), 1);
152       $("#basketusers_ids").val(ids.join(':'));
153     }
154 //]]>
155 </script>
156 <style type="text/css">
157 .sortmsg {font-size: 80%;}
158 </style>
159 </head>
160 <body id="acq_basket" class="acq">
161 [% INCLUDE 'header.inc' %]
162 [% INCLUDE 'acquisitions-search.inc' %]
163
164
165 <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?booksellerid=[% booksellerid %]">[% name|html %]</a> &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
166
167 <div id="doc3" class="yui-t2">
168
169 <div id="bd">
170     <div id="yui-main">
171     [% IF (cannot_manage_basket) %]
172         <div class="yui-b">
173             <p class="error">You are not authorised to manage this basket.</p>
174         </div>
175     [% ELSE %]
176     <div class="yui-b">
177         [% UNLESS ( confirm_close ) %]
178         [% UNLESS ( selectbasketg ) %]
179             [% UNLESS ( closedate ) %]
180                 <div id="toolbar" class="btn-toolbar">
181                     <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-plus"></i> Add to basket</a></div>
182                     <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div>
183                     <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div>
184                    [% IF ( unclosable ) %]
185                     [% ELSIF ( uncertainprices ) %]
186                         <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div>
187                     [% ELSE %]
188                         <div class="btn-group">
189                             <a href="[% script_name %]?op=close&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="icon-remove-sign"></i> Close this basket</a>
190                         </div>
191                     [% END %]
192                         <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
193                 </div>
194 <!-- Modal for confirm deletion box-->
195                 <div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
196                     <div class="modal-header">
197                         <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
198                         <h3>Confirm deletion</h3>
199                     </div>
200                     [% UNLESS book_foot_loop.size > 0 %]
201                         <div class="modal-body">
202                            <p>Are you sure you want to delete this basket?</p>
203                         </div>
204                         <div class="modal-footer">
205                             <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
206                             <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket</button>
207                         </div>
208                     [% ELSE %]
209                         <div class="modal-body">
210                            <p>Are you sure you want to delete this basket?</p>
211                            <p>Warning:</p>
212                            <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
213                            <p>If items have been created when ordering or receiving, they will be deleted.</p>
214                            <p>You can choose to delete bibliographic records if possible (bibliographic records that have other items or that are used in a subscription or another order will not be deleted).</p>
215                         </div>
216                         <div class="modal-footer">
217                             <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
218                             <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;">Delete basket and orders</button>
219                             <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and bibs</button>
220                         </div>
221                     [% END %]
222                 </div>
223 <!-- End of Modal-->
224             [% ELSE %]
225                 [% UNLESS ( grouped ) %]
226                 <div id="toolbar" class="btn-toolbar">
227                     <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="icon-refresh"></i> Reopen this basket</a></div>
228                     <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
229                 </div>
230                 [% END %]
231             [% END %]
232             [% END %]
233
234     [% IF ( NO_BOOKSELLER ) %]
235     <h2>Vendor not found</h2>
236     [% ELSE %]
237         [% IF ( delete_confirmed ) %]
238             <h3>Basket deleted</h3>
239             [% IF (cannotdelbiblios) %]
240                 <div class="dialog alert">
241                     <p><strong>Warning:</strong></p>
242                     <p><strong>The following records could not be deleted:</strong></p>
243                     <ul>
244                     [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
245                         <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber %]">[% cannotdelbiblio.title |html %]</a> by [% cannotdelbiblio.author %]:
246                             <ul>
247                             [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount %] item(s) attached.</li>[% END %]
248                             [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions %] subscription(s) attached.</li>[% END %]
249                             [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio %] order(s) attached.</li>[% END %]
250                             [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
251                             </ul>
252                         </li>
253                     [% END %]
254                     </ul>
255                 </div>
256                 <a href="booksellers.pl">Click here to go back to booksellers page</a>
257             [% ELSE %]
258             <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
259             [% END %]
260         [% ELSE %]
261         <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
262         [% IF ( delete_confirm ) %]
263             <h2>
264             <span class="yui-button yui-link-button">
265             <em class="first-child">
266                 <a href="[% script_name %]?op=delete_confirm&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a>
267             </em>
268             </span>
269             <span class="yui-button yui-link-button">
270             <em class="first-child">
271                 <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a>
272             </em>
273             </span>
274             </h2>
275         [% END %]
276         [% IF ( basketno ) %]
277             <div id="acqui_basket_summary" class="yui-g">
278                 <div class="rows">
279                 <div class="yui-u first">
280                 <ol>
281                 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
282                 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
283                 [% IF ( basketcontractno ) %]
284                     <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]&amp;booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
285                 [% END %]
286                 [% IF ( deliveryplace ) %]<li><span class="label">Delivery place:</span> [% deliveryplace %]</li>[% END %]
287                 [% IF ( billingplace ) %]<li><span class="label">Billing place:</span> [% billingplace %]</li>[% END %]
288                 [% IF ( authorisedbyname ) %]<li><span class="label">Created by:</span>  [% authorisedbyname %]</li>[% END %]
289                 <li id="managedby">
290                     <form action="" method="post">
291                         <span class="label">Managed by:</span>
292                         <div style="float:left">
293                             <ul id="basketusers_names" style="padding-left:0">
294                               [% FOREACH user IN basketusers %]
295                                 <li id="user_[% user.borrowernumber %]">
296                                     [% user.firstname %] [% user.surname %]
297                                     [<a onclick="del_basket_user([% user.borrowernumber %]);" style="cursor:pointer">Delete user</a>]
298                                 </li>
299                               [% END %]
300                             </ul>
301                             <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
302                             <input type="hidden" id="basketusers_ids" name="basketusers_ids" value="[% basketusers_ids %]" />
303                             <input type="hidden" id="op" name="op" value="mod_users" />
304                             <input type="button" id="add_user" onclick="basketUserSearchPopup();" value="Add user" />
305                             <input type="submit" value="Save changes" />
306                         </div>
307                     </form>
308                 </li>
309                 <li id="branch">
310                     <span class="label">Branch:</span>
311                     [% IF basketbranchname %]
312                         [% basketbranchname %]
313                     [% ELSE %]
314                         No branch
315                     [% END %]
316                     [% IF branches_loop.size %]
317                         <form action="" method="post">
318                             <select id="branch" name="branch">
319                                 <option value="">(no branch)</option>
320                                 [% FOREACH branch IN branches_loop %]
321                                     [% IF (branch.selected) %]
322                                         <option selected="selected" value="[% branch.branchcode %]"> [% branch.branchname %]</option>
323                                     [% ELSE %]
324                                         <option value="[% branch.branchcode %]"> [% branch.branchname %]</option>
325                                     [% END %]
326                                 [% END %]
327                             </select>
328                             <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
329                             <input type="hidden" id="op" name="op" value="mod_branch" />
330                             <input type="submit" value="Change" />
331                         </form>
332                     [% END %]
333                 </li>
334                 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span>  [% creationdate | $KohaDates %]</li>[% END %]
335                 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %]
336                 [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates  %]</li>[% END %]
337
338                 </ol>
339                 </div>
340                 [% IF ( closedate ) %]
341                 <div class="yui-u">
342                     [% IF ( CAN_user_acquisition_group_manage ) %]
343                     <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
344                     [% END %]
345                         <ol>
346                         <li>
347                           <span class="label">Basket group:</span>
348                           [% IF basketgroup.closed %]
349                             [% basketgroup.name %] (closed)
350                           [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
351                             [%- IF basketgroup.name -%]
352                                 [% basketgroup.name %]
353                             [%- ELSE -%]
354                                 No group
355                             [%- END -%]
356                           [% ELSE %]
357                             <select id="basketgroupid" name="basketgroupid">
358                               <option value="new">Add new group</option>
359                               [% FOREACH bg IN basketgroups %]
360                                 [% IF ( bg.default ) %]
361                                     <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
362                                 [% ELSE %]
363                                   [% UNLESS bg.closed %]
364                                     <option value="[% bg.id %]">[% bg.name %]</option>
365                                   [% ELSE %]
366                                     <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
367                                   [% END %]
368                                 [% END %]
369                               [% END %]
370                             </select>
371                             <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
372                             <input type="hidden" value="mod_basket" name="op" />
373                             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
374                             <input type="submit" value="Change basket group" />
375                           [% END %]
376                         </li>
377                     [% IF ( basketgroup.deliveryplacename ) %]<li><span class="label">Basket group delivery placename:</span> [% basketgroup.deliveryplacename %]</li>[% END %]
378                     [% IF ( basketgroup.billingplacename ) %]<li><span class="label">Basket group billing place:</span> [% basketgroup.billingplacename %]</li>[% END %]
379                         </ol>
380                     [% IF ( CAN_user_acquisition_group_manage ) %]
381                     </form>
382                     [% END %]
383                 </div>
384                 [% END %]
385             </div>
386             </div>
387         [% END %]
388
389         [% UNLESS ( delete_confirm ) %]
390         <div id="acqui_basket_content" class="yui-g">
391         [% IF ( books_loop ) %]
392         <h2>Orders</h2>
393         <label for="show_all_details">
394             <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
395             Show all details
396         </label>
397             <table id="orders">
398                 <thead>
399                     <tr>
400                         <th>Order</th>
401                         <th class="gste">RRP tax exc.</th>
402                         <th class="gste">ecost tax exc.</th>
403                         <th class="gsti">RRP tax inc.</th>
404                         <th class="gsti">ecost tax inc.</th>
405                         <th>Qty.</th>
406                         <th class="gste">Total tax exc. ([% currency %])</th>
407                         <th class="gsti">Total tax inc. ([% currency %])</th>
408                         <th>GST %</th>
409                         <th>GST</th>
410                         <th>Fund</th>
411                         [% IF ( active ) %]
412                             [% UNLESS ( closedate ) %]
413                                 <th>Modify</th>
414                                 <th>Delete</th>
415                             [% END %]
416                         [% END %]
417                     </tr>
418                 </thead>
419                 <tfoot>
420                 [% FOREACH foot_loo IN book_foot_loop %]
421                     <tr>
422                         <th>Total (GST [% foot_loo.gstgsti %])</th>
423                         <th class="gste">&nbsp;</th>
424                         <th class="gste">&nbsp;</th>
425                         <th class="gsti">&nbsp;</th>
426                         <th class="gsti">&nbsp;</th>
427                         <th>[% foot_loo.quantity %]</th>
428                         <th class="gste">[% foot_loo.totalgste %]</th>
429                         <th class="gsti">[% foot_loo.totalgsti %]</th>
430                         <th>&nbsp;</th>
431                         <th>[% foot_loo.gstvalue %]</th>
432                         <th>&nbsp;</th>
433                         [% IF ( active ) %]
434                             [% UNLESS ( closedate ) %]
435                                 <th>&nbsp;</th>
436                                 <th>&nbsp;</th>
437                             [% END %]
438                         [% END %]
439                     </tr>
440                 [% END %]
441                 <tr>
442                     <th>Total ([% currency %])</th>
443                     <th class="gste">&nbsp;</th>
444                     <th class="gste">&nbsp;</th>
445                     <th class="gsti">&nbsp;</th>
446                     <th class="gsti">&nbsp;</th>
447                     <th>[% total_quantity %]</th>
448                     <th class="gste">[% total_gste %]</th>
449                     <th class="gsti">[% total_gsti %]</th>
450                     <th>&nbsp;</th>
451                     <th>[% total_gstvalue %]</th>
452                     <th>&nbsp;</th>
453                     [% IF ( active ) %]
454                         [% UNLESS ( closedate ) %]
455                             <th>&nbsp;</th>
456                             <th>&nbsp;</th>
457                         [% END %]
458                     [% END %]
459                 </tr>
460                 </tfoot>
461                 <tbody>
462                 [% FOREACH books_loo IN books_loop %]
463                     [% IF ( books_loo.order_received ) %]<tr class="disabled">[% ELSE %][% IF ( books_loo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %][% END %]
464                         <td>
465                             <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
466                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
467                                 <br />
468                                 [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
469                                 [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
470                                 [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
471                                 [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
472                                 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
473                                 [% IF ( books_loo.suggestionid ) %]
474                                     <br/>
475                                     Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
476                                     (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&amp;op=show">suggestion #[% books_loo.suggestionid %]</a>)
477                                 [% END %]
478                             </p>
479                                 [% IF ( books_loo.notes ) %]
480                                     <p class="ordernote"><strong>Note: </strong>[% books_loo.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Change note</a>]</p>
481                                 [% ELSE %]
482                                     <p>[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>]</p>
483                                 [% END %]
484                             [% IF (books_loo.transferred_from) %]
485                               [% basket = books_loo.transferred_from.basket %]
486                               [% bookseller = books_loo.transferred_from.bookseller %]
487                               [% timestamp = books_loo.transferred_from.timestamp %]
488                               <p>Transferred from
489                                 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">basket: [% basket.basketname %]</a>
490                                 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
491                                 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
492                                   [% timestamp | $KohaDates %]
493                                 </span>
494                               </p>
495                             [% END %]
496                         </td>
497                         [% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %]
498                         [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
499                         <td class="number gste [% IF books_loo.rrpgste.search(zero_regex) %]error[% END %]">[% books_loo.rrpgste %]</td>
500                         <td class="number gste [% IF books_loo.ecostgste.search(zero_regex) %]error[% END %]">[% books_loo.ecostgste %]</td>
501                         <td class="number gsti [% IF books_loo.rrpgsti.search(zero_regex) %]error[% END %]">[% books_loo.rrpgsti %]</td>
502                         <td class="number gsti [% IF books_loo.ecostgsti.search(zero_regex) %]error[% END %]">[% books_loo.ecostgsti %]</td>
503                         <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
504                         <td class="number gste [% IF books_loo.totalgste.search(zero_regex) %]error[% END %]">[% books_loo.totalgste %]</td>
505                         <td class="number gsti [% IF books_loo.totalgsti.search(zero_regex) %]error[% END %]">[% books_loo.totalgsti %]</td>
506                         <td class="number [% IF books_loo.gstgsti.search(zero_regex) %]error[% END %]">[% books_loo.gstgsti %]</td>
507                         <td class="number [% IF books_loo.gstvalue.search(zero_regex) %]error[% END %]">[% books_loo.gstvalue %]</td>
508                         <td>[% books_loo.budget_name %]</td>
509                         [% IF ( active ) %]
510                             [% UNLESS ( closedate ) %]
511                             <td>
512                                 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Modify</a>
513                                 [% UNLESS (books_loo.order_received) %]
514                                     <br />
515                                     <a href="#" onclick="transfer_order_popup([% books_loo.ordernumber %]); return false;">Transfer</a>
516                                 [% END %]
517                             </td>
518                             <td>
519                             [% IF ( books_loo.left_holds_on_order ) %]
520                             <span class="button" title="Can't delete order, ([% books_loo.holds_on_order %]) holds are linked with this order cancel holds first">Can't delete order</span><br>
521                             [% ELSE %]
522                             <a href="javascript:confirm_delete_item([% books_loo.ordernumber %],[% books_loo.biblionumber %])" class="button">Delete order</a><br>
523                             [% END %]
524                             [% IF ( books_loo.can_del_bib ) %]
525                             <a href="javascript:confirm_delete_biblio([% books_loo.ordernumber %],[% books_loo.biblionumber %])" class="button">Delete order and catalog record</a><br>
526                             [% ELSE %]
527                             <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
528                             [% END %]
529                             [% IF ( books_loo.left_item ) %]
530                             <b title="Can't delete catalog record, because of [% books_loo.items %] existing hold(s)" >[% books_loo.items %] item(s) left</b><br>
531                             [% END %]
532                             [% IF ( books_loo.left_biblio ) %]
533                             <b title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios %] order(s) left</b><br>
534                             [% END %]
535                             [% IF ( books_loo.left_subscription ) %]
536                             <b title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions %] subscription(s) left</b><br>
537                             [% END %]
538                             [% IF ( books_loo.left_holds ) %]
539                             <b title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds %] hold(s) left</b>
540                             [% END %]
541                             </td>
542                             [% END %]
543                         [% END %]
544                     </tr>
545                 [% END %]
546                 </tbody>
547             </table>
548         [% END %]
549         [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
550         [% END %]
551         </div>
552         [% IF (cancelledorders_loop) %]
553           <div id="cancelledorders">
554             <h2>Cancelled orders</h2>
555             <table id="cancelledorderst">
556               <thead>
557                 <tr>
558                   <th>Order</th>
559                   <th class="gste">RRP tax exc.</th>
560                   <th class="gste">ecost tax exc.</th>
561                   <th class="gsti">RRP tax inc.</th>
562                   <th class="gsti">ecost tax inc.</th>
563                   <th>Qty.</th>
564                   <th class="gste">Total tax exc. ([% currency %])</th>
565                   <th class="gsti">Total tax inc. ([% currency %])</th>
566                   <th>GST %</th>
567                   <th>GST</th>
568                   <th>Fund</th>
569                 </tr>
570               </thead>
571               <tbody>
572                 [% FOREACH order IN cancelledorders_loop %]
573                   <tr style="color:grey">
574                     <td>
575                       <p>
576                         [% IF ( order.order_received ) %] (rcvd)[% END %]
577                         [% IF (order.title) %]
578                           [% order.title |html %] by [% order.author %]<br />
579                         [% ELSE %]
580                           <em>Deleted bibliographic record, can't find title</em><br />
581                         [% END %]
582                         [% IF ( order.notes ) %] [% order.notes %][% END %]
583                         [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
584                         [% IF ( order.issn ) %] - [% order.issn %][% END %]
585                         [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
586                         [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
587                         [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
588                       </p>
589                       [% IF order.transferred_to %]
590                         [% basket = order.transferred_to.basket %]
591                         [% bookseller = order.transferred_to.bookseller %]
592                         [% timestamp = order.transferred_to.timestamp %]
593                         <p>Transferred to
594                           <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">basket: [% basket.basketname %]</a>
595                           (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
596                           on <span title="[% timestamp | $KohaDates with_hours = 1%]">
597                             [% timestamp | $KohaDates %]
598                           </span>
599                         </p>
600                       [% END %]
601                     </td>
602                     <td class="number gste">[% order.rrpgste %]</td>
603                     <td class="number gste">[% order.ecostgste %]</td>
604                     <td class="number gsti">[% order.rrpgsti %]</td>
605                     <td class="number gsti">[% order.ecostgsti %]</td>
606                     <td class="number">[% order.quantity %]</td>
607                     <td class="number gste">[% order.totalgste %]</td>
608                     <td class="number gsti">[% order.totalgsti %]</td>
609                     <td class="number">[% order.gstgsti %]</td>
610                     <td class="number">[% order.gstvalue %]</td>
611                     <td>[% order.budget_name %]
612                   </tr>
613                 [% END %]
614               </tbody>
615             </table>
616           </div>
617         [% END %]
618         <br />
619         [% UNLESS ( closedate ) %]
620
621     <!-- Modal -->
622     <div id="addtoBasket" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
623         <div class="modal-body"></div>
624         <div class="modal-footer">
625             <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
626         </div>
627     </div>
628
629         [% INCLUDE 'acquisitions-add-to-basket.inc' %]
630         [% END %]
631         [% END %]
632 [% END %]
633 [% END %]    [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
634     [% END %]
635 [% IF ( confirm_close ) %]
636         <div id="closebasket_needsconfirmation" class="dialog alert">
637
638         <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
639             <h1>Are you sure you want to close basket [% basketname|html %]?</h1>
640             [% IF ( CAN_user_acquisition_group_manage ) %]
641             <p>
642             <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
643             <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
644             </p>
645             [% END %]
646             <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
647             <input type="hidden" value="close" name="op" />
648             <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
649             <input type="hidden" name="confirm" value="1" />
650             <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
651             <input type="submit" class="approve" value="Yes, close (Y)" accesskey="y" />
652             <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;" />
653         </form>
654         </div>
655     [% END %]
656 </div>
657 [% END %][%# IF (cannot_manage_basket) %]
658 </div>
659 <div class="yui-b">
660 [% INCLUDE 'acquisitions-menu.inc' %]
661 </div>
662 </div>
663 [% INCLUDE 'intranet-bottom.inc' %]