2 <div class="btn-group">
3 <a id="exportbutton" class="btn btn-default btn-sm" href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]"><i class="fa fa-download"></i> Export as CSV</a>
4 <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
5 <ul class="dropdown-menu" id="export-csv-menu">
6 <li><a href="#">Default</a></li>
8 [% FOR csv IN csv_profiles %]
9 <li><a href="#" data-value="[% csv.export_format_id %]">[% csv.profile %]</a></li>
18 [% USE AuthorisedValues %]
19 [% SET footerjs = 1 %]
20 [% INCLUDE 'doc-head-open.inc' %]
21 <title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
22 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
23 [% INCLUDE 'doc-head-close.inc' %]
24 <style type="text/css">
25 .sortmsg {font-size: 80%;}
29 <body id="acq_basket" class="acq">
30 [% INCLUDE 'header.inc' %]
31 [% INCLUDE 'acquisitions-search.inc' %]
34 <div id="breadcrumbs">
35 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
36 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
37 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a> ›
38 [% UNLESS ( basketno ) %][% IF ( delete_confirmed ) %]Deleted [% ELSE %]New [% END %][% END %]Basket [% basketname|html %] [% IF ( basketno ) %]([% basketno |html %])[% END %] for [% booksellername|html %]
41 <div id="doc3" class="yui-t2">
45 [% IF (cannot_manage_basket) %]
47 <p class="error">You are not authorised to manage this basket.</p>
51 [% IF !confirm_close && !edi_confirm %]
52 [% UNLESS ( selectbasketg ) %]
53 [% UNLESS ( closedate ) %]
54 [% UNLESS ( delete_confirmed ) %]
55 <div id="toolbar" class="btn-toolbar">
57 <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-default btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div>
59 <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-default btn-sm" id="basketheadbutton"><i class="fa fa-pencil"></i> Edit basket</a></div>
60 [%# FIXME This action should not be available for everyone %]
61 <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-default btn-sm" data-toggle="modal" id="delbasketbutton"><i class="fa fa-trash"></i> Delete this basket</a></div>
62 [% IF ( unclosable ) %]
63 [% ELSIF ( uncertainprices ) %]
64 <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="btn btn-default btn-sm" id="uncertpricesbutton"><i class="fa fa-usd"></i> Uncertain prices</a></div>
65 <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
66 <a href="" class="btn btn-default btn-sm disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close this basket</a>
69 <div class="btn-group">
70 <a href="/cgi-bin/koha/acqui/basket.pl?op=close&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="closebutton"><i class="fa fa-times-circle"></i> Close this basket</a>
74 [% PROCESS csv_export %]
77 <div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
80 [% IF ( active && books_loop ) %]
81 <div class="btn-group">
82 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
83 <input type="hidden" name="op" value="email" />
84 <input type="hidden" name="basketno" value="[% basketno %]" />
85 <button type="submit" class="btn btn-default btn-sm" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
92 <!-- Modal for confirm deletion box-->
93 <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
94 <div class="modal-dialog">
95 <div class="modal-content">
96 <div class="modal-header">
97 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
98 <h3>Confirm deletion</h3>
100 [% UNLESS book_foot_loop %]
101 <div class="modal-body">
102 <p>Are you sure you want to delete this basket?</p>
104 <div class="modal-footer">
105 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
106 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
107 <input type="hidden" name="op" value="delete_confirm" />
108 <input type="hidden" name="basketno" value="[% basketno %]" />
109 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
110 <input type="hidden" name="delbiblio" value="0" />
111 <button type="submit" class="btn btn-default btn-default">Delete basket</button>
115 <div class="modal-body">
116 <p>Are you sure you want to delete this basket?</p>
118 <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
119 <p>If items have been created when ordering or receiving, they will be deleted.</p>
120 <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>
122 <div class="modal-footer">
123 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
124 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
125 <input type="hidden" name="op" value="delete_confirm" />
126 <input type="hidden" name="basketno" value="[% basketno %]" />
127 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
128 <input type="hidden" name="delbiblio" value="0" />
129 <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
132 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
133 <input type="hidden" name="op" value="delete_confirm" />
134 <input type="hidden" name="basketno" value="[% basketno %]" />
135 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
136 <input type="hidden" name="delbiblio" value="1" />
137 <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
147 [% UNLESS ( grouped ) %]
148 <div id="toolbar" class="btn-toolbar">
150 <div class="btn-group"><a href="#" class="btn btn-default btn-sm" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen this basket</a></div>
152 [% PROCESS csv_export %]
159 [% IF ( NO_BOOKSELLER ) %]
160 <h2>Vendor not found</h2>
162 [% IF ( delete_confirmed ) %]
163 <div class="dialog message">
164 <h3>Basket deleted</h3>
166 [% IF (cannotdelbiblios) %]
167 <div class="dialog alert">
168 <p><strong>Warning:</strong></p>
169 <p><strong>The following records could not be deleted:</strong></p>
171 [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
172 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber %]">[% cannotdelbiblio.title |html %]</a> by [% cannotdelbiblio.author %]:
174 [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount %] item(s) attached.</li>[% END %]
175 [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions %] subscription(s) attached.</li>[% END %]
176 [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio %] order(s) attached.</li>[% END %]
177 [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
183 <a href="booksellers.pl">Click here to go back to booksellers page</a>
185 <a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]" class="btn btn-default btn-sm">Show baskets for vendor [% booksellername | html %]</a> <a href="/cgi-bin/koha/acqui/booksellers.pl" class="btn btn-default btn-sm">Show all active baskets</a>
189 [% FOR m IN messages %]
190 <div class="dialog [% m.type %]">
192 [% CASE 'no_email' %]
193 This vendor has no contact selected for sending orders to or is missing an e-mail address.
194 [% CASE 'no_basketno' %]
196 [% CASE 'no_letter' %]
197 There is no notice template with code ACQORDER defined.
198 [% CASE 'email_sent' %]
199 Order e-mail was sent to the vendor.
201 ERROR! - [% m.code %]
205 <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a></h1>
206 [% IF ( basketno ) %]
207 <div id="acqui_basket_summary" class="yui-g">
209 <div class="yui-u first">
211 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote |html %]</li>[% END %]
212 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote |html %]</li>[% END %]
213 [% IF ( basketcontractno ) %]
214 <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]&booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
216 [% IF deliveryplace %]<li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) %]</li>[% END %]
217 [% IF billingplace %]<li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) %]</li>[% END %]
218 [% IF ( authorisedbyname ) %]<li><span class="label">Created by:</span> [% authorisedbyname %]</li>[% END %]
220 <form action="" method="post">
221 <span class="label">Managed by:</span>
222 <div style="float:left">
223 <ul id="users_names" style="padding-left:0">
224 [% FOREACH user IN users %]
225 <li id="user_[% user.borrowernumber %]">
226 [% user.firstname %] [% user.surname %]
227 <a href="#" data-borrowernumber="[% user.borrowernumber %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a>
231 <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
232 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids %]" />
233 <input type="hidden" id="op" name="op" value="mod_users" />
234 <input type="button" id="add_user" value="Add user" />
235 <input type="submit" value="Save changes" />
240 <span class="label">Library:</span>
241 [% IF basketbranchcode %]
242 [% Branches.GetName( basketbranchcode ) %]
246 [% IF branches_loop.size %]
247 <form action="" method="post">
248 <select id="branch" name="branch">
249 <option value="">(no library)</option>
250 [% FOREACH branch IN branches_loop %]
251 [% IF (branch.selected) %]
252 <option selected="selected" value="[% branch.branchcode %]"> [% branch.branchname %]</option>
254 <option value="[% branch.branchcode %]"> [% branch.branchname %]</option>
258 <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
259 <input type="hidden" id="op" name="op" value="mod_branch" />
260 <input type="submit" value="Change" />
264 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>[% END %]
265 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %]
266 [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>[% END %]
267 <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
269 [% IF basket.create_items %]
271 <span class="label">Create items when:</span>
272 [% SWITCH basket.create_items %]
273 [% CASE 'receiving' %]Receiving items
274 [% CASE 'cataloguing' %]Cataloguing items
275 [% CASE %]Placing orders
282 [% IF ( closedate ) %]
284 [% IF ( CAN_user_acquisition_group_manage ) %]
285 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
289 <span class="label">Basket group:</span>
290 [% IF basketgroup.id and not basketgroup.name %]
291 [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
293 [% IF basketgroup.closed %]
294 [% IF ( CAN_user_acquisition_group_manage ) %]
295 <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid %]&basketgroupid=[% basketgroup.id %]" title="basketgroup">[% basketgroup.name %] (closed)</a>
297 [% basketgroup.name %] (closed)
299 [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
300 [%- IF basketgroup.id -%]
301 [% basketgroup.name %]
306 <select id="basketgroupid" name="basketgroupid">
307 <option value="">No group</option>
308 [% FOREACH bg IN basketgroups %]
309 [% IF ( bg.default ) %]
310 <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
312 [% UNLESS bg.closed %]
313 <option value="[% bg.id %]">[% bg.name %]</option>
315 <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
319 <option value="new">Add new group</option>
321 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
322 <input type="hidden" value="mod_basket" name="op" />
323 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
324 <input type="submit" value="Change basket group" />
327 [% IF basketgroup.deliveryplace %]<li><span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) %]</li>[% END %]
328 [% IF basketgroup.billingplace %]<li><span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) %]</li>[% END %]
330 [% IF ( CAN_user_acquisition_group_manage ) %]
338 [% IF ( duplinbatch ) %]<div class="dialog alert">
339 <h4>Duplicate warning</h4>
340 <p>Some records have not been automatically added because they match an existing record in your catalog:<a href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=[% duplinbatch %]&basketno=[% basketno %]&booksellerid=[% booksellerid %]" title="Open in new window" target="_blank" class="popup" style="margin-left:10px">Display them</a></p>
343 <div id="acqui_basket_content" class="yui-g">
344 [% IF ( books_loop ) %]
346 <label for="show_all_details">
347 <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
354 <th class="anti-the">Order</th>
355 <th class="tax_excluded">RRP tax exc.</th>
356 <th class="tax_excluded">ecost tax exc.</th>
357 <th class="tax_included">RRP tax inc.</th>
358 <th class="tax_included">ecost tax inc.</th>
360 <th class="tax_excluded">Total tax exc. ([% currency %])</th>
361 <th class="tax_included">Total tax inc. ([% currency %])</th>
365 <th>Supplier report</th>
367 [% UNLESS ( closedate ) %]
369 <th>Cancel order</th>
375 [% FOREACH foot_loo IN book_foot_loop %]
378 <th>Total (GST [% foot_loo.tax_rate * 100 %])</th>
379 <th class="tax_excluded"> </th>
380 <th class="tax_excluded"> </th>
381 <th class="tax_included"> </th>
382 <th class="tax_included"> </th>
383 <th>[% foot_loo.quantity %]</th>
384 <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th>
385 <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
387 <th>[% foot_loo.tax_value | $Price %]</th>
391 [% UNLESS ( closedate ) %]
400 <th>Total ([% currency %])</th>
401 <th class="tax_excluded"> </th>
402 <th class="tax_excluded"> </th>
403 <th class="tax_included"> </th>
404 <th class="tax_included"> </th>
405 <th>[% total_quantity %]</th>
406 <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
407 <th class="tax_included">[% total_tax_included | $Price %]</th>
409 <th>[% total_tax_value | $Price %]</th>
413 [% UNLESS ( closedate ) %]
421 [% FOREACH books_loo IN books_loop %]
422 [% IF ( books_loo.order_received ) %]
423 <tr class="disabled">
428 [% books_loo.ordernumber %]
432 [% IF ( books_loo.order_received ) %] (rcvd)[% END %]
433 [% IF books_loo.title %]
434 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a>[% IF books_loo.author %] by [% books_loo.author %][% END %]
436 <em>Deleted bibliographic record, can't find title</em><br />
439 [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
440 [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
441 [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
442 [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %]
443 [% ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate %][% END %]
444 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
445 [% IF ( books_loo.suggestionid ) %]
447 Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
448 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&op=show">suggestion #[% books_loo.suggestionid %]</a>)
451 [% IF ( books_loo.order_internalnote ) %]
452 <p class="ordernote"><strong>Internal note: </strong>[% books_loo.order_internalnote|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=internal">Change internal note</a>]</p>
454 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=internal">Add internal note</a>]
456 [% IF ( books_loo.order_vendornote ) %]
457 <p class="ordernote"><strong>Vendor note: </strong>[% books_loo.order_vendornote|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=vendor">Change vendor note</a>]</p>
459 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=vendor">Add vendor note</a>]
461 [% IF (books_loo.transferred_from) %]
462 [% basket = books_loo.transferred_from.basket %]
463 [% bookseller = books_loo.transferred_from.bookseller %]
464 [% timestamp = books_loo.transferred_from.timestamp %]
465 <p>Transferred from basket:
466 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"> [% basket.basketname %]</a>
467 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
468 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
469 [% timestamp | $KohaDates %]
474 [% 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 ... %]
475 [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
476 <td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td>
477 <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td>
478 <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
479 <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
480 <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
481 <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
482 <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
483 <td class="number">[% books_loo.tax_rate * 100 %]</td>
484 <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
485 <td>[% books_loo.budget_name %]</td>
486 <td>[% books_loo.suppliers_report %]</td>
488 [% UNLESS ( closedate ) %]
490 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Modify</a>
491 [% UNLESS (books_loo.order_received) %]
493 <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber %]">Transfer</a>
497 [% IF ( books_loo.left_holds_on_order ) %]
498 <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order %]) holds are linked with this order cancel holds first">Can't cancel order</span><br>
500 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber %]&biblionumber=[% books_loo.biblionumber %]&basketno=[% basketno %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]" class="button">Cancel order</a><br>
502 [% IF ( books_loo.can_del_bib ) %]
503 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber %]&biblionumber=[% books_loo.biblionumber %]&basketno=[% basketno %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno %]" class="button">Cancel order and delete catalog record</a><br>
505 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
507 [% IF ( books_loo.left_item ) %]
508 <b title="Can't delete catalog record, because of [% books_loo.items %] existing hold(s)" >[% books_loo.items %] item(s) left</b><br>
510 [% IF ( books_loo.left_biblio ) %]
511 <b title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios %] order(s) left</b><br>
513 [% IF ( books_loo.left_subscription ) %]
514 <b title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions %] subscription(s) left</b><br>
516 [% IF ( books_loo.left_holds ) %]
517 <b title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds %] hold(s) left</b>
527 [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
530 [% IF (cancelledorders_loop) %]
531 <div id="cancelledorders">
532 <h2>Cancelled orders</h2>
533 <table id="cancelledorderst">
538 <th class="tax_excluded">RRP tax exc.</th>
539 <th class="tax_excluded">ecost tax exc.</th>
540 <th class="tax_included">RRP tax inc.</th>
541 <th class="tax_included">ecost tax inc.</th>
543 <th class="tax_excluded">Total tax exc. ([% currency %])</th>
544 <th class="tax_included">Total tax inc. ([% currency %])</th>
551 [% FOREACH order IN cancelledorders_loop %]
552 <tr style="color:grey">
554 [% order.ordernumber %]
558 [% IF ( order.order_received ) %] (rcvd)[% END %]
559 [% IF (order.title) %]
560 [% order.title |html %][% IF order.author %] by [% order.author %][% END %]
562 <em>Deleted bibliographic record, can't find title</em>
565 [% IF ( order.order_internalnote ) %] [% order.order_internalnote %][% END %]
566 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
567 [% IF ( order.issn ) %] - [% order.issn %][% END %]
568 [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
569 [% IF ( order.publicationyear ) %], [% order.publicationyear %]
570 [% ELSIF ( order.copyrightdate ) %] [% order.copyrightdate %][% END %]
571 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
572 [% IF ( order.cancellationreason ) %]
574 Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) %]
577 [% IF order.transferred_to %]
578 [% basket = order.transferred_to.basket %]
579 [% bookseller = order.transferred_to.bookseller %]
580 [% timestamp = order.transferred_to.timestamp %]
581 <p>Transferred to basket:
582 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"> [% basket.basketname %]</a>
583 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
584 on <span title="[% timestamp | $KohaDates with_hours = 1%]">
585 [% timestamp | $KohaDates %]
590 <td class="number tax_excluded">[% order.rrp_tax_excluded | $Price %]</td>
591 <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td>
592 <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td>
593 <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td>
594 <td class="number">[% order.quantity %]</td>
595 <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
596 <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
597 <td class="number">[% order.tax_rate * 100 %]</td>
598 <td class="number">[% order.tax_value | $Price %]</td>
599 <td>[% order.budget_name %]
607 [% UNLESS ( closedate ) %]
610 <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
611 <div class="modal-dialog">
612 <div class="modal-content">
613 <div class="modal-body">
615 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
618 <div class="modal-footer">
619 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
628 [% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
630 [% IF ( confirm_close ) %]
631 <div id="closebasket_needsconfirmation" class="dialog alert">
633 <form action="/cgi-bin/koha/acqui/basket.pl">
634 <h1>Are you sure you want to close basket [% basketname|html %]?</h1>
635 [% IF ( CAN_user_acquisition_group_manage ) %]
637 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
638 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
641 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
642 <input type="hidden" value="close" name="op" />
643 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
644 <input type="hidden" name="confirm" value="1" />
645 <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
646 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
648 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
649 <input type="hidden" name="basketno" value="[% basketno %]" />
650 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
655 <div id="closebasket_needsconfirmation" class="dialog alert">
657 <form action="/cgi-bin/koha/acqui/basket.pl">
658 <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname|html %]?</h1>
659 [% IF CAN_user_acquisition_group_manage %]
661 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
662 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
665 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
666 <input type="hidden" value="ediorder" name="op" />
667 <input type="hidden" name="ean" value="[% ean %]" />
668 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
669 <input type="hidden" name="confirm" value="1" />
670 <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
671 <button type="submit" class="approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
673 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
674 <input type="hidden" name="basketno" value="[% basketno %]" />
675 <button type="submit" class="deny" accesskey="N"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
680 [% END %][%# IF (cannot_manage_basket) %]
683 [% INCLUDE 'acquisitions-menu.inc' %]
687 [% MACRO jsinclude BLOCK %]
688 <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
689 [% INCLUDE 'datatables.inc' %]
690 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
691 <script type="text/javascript">
692 function updateColumnsVisibility(visible) {
694 $("table .tax_excluded, .tax_included").show();
696 [% IF ( listincgst ) %]
697 $("table .tax_excluded").hide();
699 $("table .tax_included").hide();
704 $(document).ready(function() {
705 if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
706 $("#show_all_details").click(function(){
707 updateColumnsVisibility($(this).is(":checked"));
710 $("#show_all_details").prop('checked', false);
711 updateColumnsVisibility(false);
712 [% UNLESS ( closedate ) %]
713 $('#addtoBasket').on('show', function () {
714 $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
718 $("body").on("click", ".del_user", function(e){
720 del_user( $(this).data("borrowernumber") );
723 $("#add_user").on("click",function(e){
728 $(".transfer_order").on("click",function(e){
730 transfer_order_popup( $(this).data("ordernumber"));
735 [% UNLESS ( closedate ) %]
736 <script type="text/javascript">
737 function transfer_order_popup(ordernumber) {
738 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
739 + "ordernumber=" + ordernumber
740 window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
743 function confirm_ediorder() {
744 var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
746 window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]";
751 <script type="text/javascript">
752 $(document).ready(function(){
753 $("#basketgroupid").change(function(){
754 if($(this).val() == "new"){
755 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
760 [% UNLESS ( grouped ) %]
761 <script type="text/javascript">
762 function confirm_reopen() {
763 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
764 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
766 window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]";
772 <script type="text/javascript">
773 $(document).ready(function() {
774 var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
775 "sPaginationType": "four_button",
778 [% UNLESS ( closedate ) %]
779 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
781 { "sType": "anti-the", "aTargets": [ "anti-the" ] }
785 var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
786 "sPaginationType": "four_button"
788 $("#reopenbutton").on("click",function(e){
792 // Generates a dynamic link for exporting the selections data as CSV
793 $("#exportbutton, #export-csv-menu a").click(function() {
794 // Building the url from currently checked boxes
795 var url = '/cgi-bin/koha/acqui/basket.pl';
796 url += $('#exportbutton').attr('href');
797 if($(this).attr("data-value")) {
798 url += '&csv_profile=' + $(this).attr("data-value");
800 // And redirecting to the CSV page
806 function UserSearchPopup(f) {
808 "/cgi-bin/koha/acqui/add_user_search.pl",
810 'width=840, height=500, scrollbars=yes, toolbar=no,'
814 function add_user(borrowernumber, borrowername) {
815 var ids = $("#users_ids").val();
817 ids = ids.split(':');
821 if (ids.indexOf(borrowernumber) < 0) {
822 ids.push(borrowernumber);
823 $("#users_ids").val(ids.join(':'));
824 var li = '<li id="user_'+borrowernumber+'">'+borrowername
825 + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
826 + _("Delete user") + '</a></li>';
827 $("#users_names").append(li);
833 function del_user(borrowernumber) {
834 $("#user_"+borrowernumber).remove();
835 var ids = $("#users_ids").val().split(':');
836 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
837 $("#users_ids").val(ids.join(':'));
842 [% INCLUDE 'intranet-bottom.inc' %]