3 <div class="btn-group">
4 <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>
5 <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
6 <ul class="dropdown-menu" id="export-csv-menu">
7 <li><a href="#">Default</a></li>
9 [% FOR csv IN csv_profiles %]
10 <li><a href="#" data-value="[% csv.export_format_id %]">[% csv.profile %]</a></li>
19 [% USE AuthorisedValues %]
20 [% SET footerjs = 1 %]
21 [% INCLUDE 'doc-head-open.inc' %]
22 <title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
23 [% Asset.css("css/datatables.css") %]
24 [% INCLUDE 'doc-head-close.inc' %]
25 <style type="text/css">
26 .sortmsg {font-size: 80%;}
30 <body id="acq_basket" class="acq">
31 [% INCLUDE 'header.inc' %]
32 [% INCLUDE 'acquisitions-search.inc' %]
35 <div id="breadcrumbs">
36 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
37 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
38 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a> ›
39 [% UNLESS ( basketno ) %][% IF ( delete_confirmed ) %]Deleted [% ELSE %]New [% END %][% END %]Basket [% basketname|html %] [% IF ( basketno ) %]([% basketno |html %])[% END %] for [% booksellername|html %]
42 <div id="doc3" class="yui-t2">
46 [% IF (cannot_manage_basket) %]
48 <p class="error">You are not authorised to manage this basket.</p>
52 [% IF !confirm_close && !edi_confirm %]
53 [% UNLESS ( selectbasketg ) %]
54 [% UNLESS ( closedate ) %]
55 [% UNLESS ( delete_confirmed ) %]
56 <div id="toolbar" class="btn-toolbar">
58 <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>
60 <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>
61 [%# FIXME This action should not be available for everyone %]
62 <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>
63 [% IF ( unclosable ) %]
64 [% ELSIF ( uncertainprices ) %]
65 <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>
66 <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
67 <a href="" class="btn btn-default btn-sm disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close this basket</a>
70 <div class="btn-group">
71 <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>
75 [% PROCESS csv_export %]
78 <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>
81 [% IF ( active && books_loop ) %]
82 <div class="btn-group">
83 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
84 <input type="hidden" name="op" value="email" />
85 <input type="hidden" name="basketno" value="[% basketno %]" />
86 <button type="submit" class="btn btn-default btn-sm" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
93 <!-- Modal for confirm deletion box-->
94 <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
95 <div class="modal-dialog">
96 <div class="modal-content">
97 <div class="modal-header">
98 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
99 <h3>Confirm deletion</h3>
101 [% UNLESS book_foot_loop %]
102 <div class="modal-body">
103 <p>Are you sure you want to delete this basket?</p>
105 <div class="modal-footer">
106 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
107 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
108 <input type="hidden" name="op" value="delete_confirm" />
109 <input type="hidden" name="basketno" value="[% basketno %]" />
110 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
111 <input type="hidden" name="delbiblio" value="0" />
112 <button type="submit" class="btn btn-default btn-default">Delete basket</button>
116 <div class="modal-body">
117 <p>Are you sure you want to delete this basket?</p>
119 <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
120 <p>If items have been created when ordering or receiving, they will be deleted.</p>
121 <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>
123 <div class="modal-footer">
124 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
125 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
126 <input type="hidden" name="op" value="delete_confirm" />
127 <input type="hidden" name="basketno" value="[% basketno %]" />
128 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
129 <input type="hidden" name="delbiblio" value="0" />
130 <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
133 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
134 <input type="hidden" name="op" value="delete_confirm" />
135 <input type="hidden" name="basketno" value="[% basketno %]" />
136 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
137 <input type="hidden" name="delbiblio" value="1" />
138 <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
148 [% UNLESS ( grouped ) %]
149 <div id="toolbar" class="btn-toolbar">
151 <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>
153 [% PROCESS csv_export %]
160 [% IF ( NO_BOOKSELLER ) %]
161 <h2>Vendor not found</h2>
163 [% IF ( delete_confirmed ) %]
164 <div class="dialog message">
165 <h3>Basket deleted</h3>
167 [% IF (cannotdelbiblios) %]
168 <div class="dialog alert">
169 <p><strong>Warning:</strong></p>
170 <p><strong>The following records could not be deleted:</strong></p>
172 [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
173 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber %]">[% cannotdelbiblio.title |html %]</a> by [% cannotdelbiblio.author %]:
175 [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount %] item(s) attached.</li>[% END %]
176 [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions %] subscription(s) attached.</li>[% END %]
177 [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio %] order(s) attached.</li>[% END %]
178 [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
184 <a href="booksellers.pl">Click here to go back to booksellers page</a>
186 <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>
190 [% FOR m IN messages %]
191 <div class="dialog [% m.type %]">
193 [% CASE 'no_email' %]
194 This vendor has no contact selected for sending orders to or is missing an e-mail address.
195 [% CASE 'no_basketno' %]
197 [% CASE 'no_letter' %]
198 There is no notice template with code ACQORDER defined.
199 [% CASE 'email_sent' %]
200 Order e-mail was sent to the vendor.
202 ERROR! - [% m.code %]
206 <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a></h1>
207 [% IF ( basketno ) %]
208 <div id="acqui_basket_summary" class="yui-g">
210 <div class="yui-u first">
212 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote |html %]</li>[% END %]
213 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote |html %]</li>[% END %]
214 [% IF ( basketcontractno ) %]
215 <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]&booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
217 [% IF deliveryplace %]<li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) %]</li>[% END %]
218 [% IF billingplace %]<li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) %]</li>[% END %]
219 [% IF ( authorisedbyname ) %]<li><span class="label">Created by:</span> [% authorisedbyname %]</li>[% END %]
221 <form action="" method="post">
222 <span class="label">Managed by:</span>
223 <div style="float:left">
224 <ul id="users_names" style="padding-left:0">
225 [% FOREACH user IN users %]
226 <li id="user_[% user.borrowernumber %]">
227 [% user.firstname %] [% user.surname %]
228 <a href="#" data-borrowernumber="[% user.borrowernumber %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a>
232 <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
233 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids %]" />
234 <input type="hidden" id="op" name="op" value="mod_users" />
235 <input type="button" id="add_user" value="Add user" />
236 <input type="submit" value="Save changes" />
241 <span class="label">Library:</span>
242 [% IF basketbranchcode %]
243 [% Branches.GetName( basketbranchcode ) %]
247 [% IF branches_loop.size %]
248 <form action="" method="post">
249 <select id="branch" name="branch">
250 <option value="">(no library)</option>
251 [% FOREACH branch IN branches_loop %]
252 [% IF (branch.selected) %]
253 <option selected="selected" value="[% branch.branchcode %]"> [% branch.branchname %]</option>
255 <option value="[% branch.branchcode %]"> [% branch.branchname %]</option>
259 <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
260 <input type="hidden" id="op" name="op" value="mod_branch" />
261 <input type="submit" value="Change" />
265 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>[% END %]
266 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %]
267 [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>[% END %]
268 <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
270 [% IF basket.create_items %]
272 <span class="label">Create items when:</span>
273 [% SWITCH basket.create_items %]
274 [% CASE 'receiving' %]Receiving items
275 [% CASE 'cataloguing' %]Cataloguing items
276 [% CASE %]Placing orders
283 [% IF ( closedate ) %]
285 [% IF ( CAN_user_acquisition_group_manage ) %]
286 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
290 <span class="label">Basket group:</span>
291 [% IF basketgroup.id and not basketgroup.name %]
292 [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
294 [% IF basketgroup.closed %]
295 [% IF ( CAN_user_acquisition_group_manage ) %]
296 <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid %]&basketgroupid=[% basketgroup.id %]" title="basketgroup">[% basketgroup.name %] (closed)</a>
298 [% basketgroup.name %] (closed)
300 [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
301 [%- IF basketgroup.id -%]
302 [% basketgroup.name %]
307 <select id="basketgroupid" name="basketgroupid">
308 <option value="">No group</option>
309 [% FOREACH bg IN basketgroups %]
310 [% IF ( bg.default ) %]
311 <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
313 [% UNLESS bg.closed %]
314 <option value="[% bg.id %]">[% bg.name %]</option>
316 <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
320 <option value="new">Add new group</option>
322 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
323 <input type="hidden" value="mod_basket" name="op" />
324 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
325 <input type="submit" value="Change basket group" />
328 [% IF basketgroup.deliveryplace %]<li><span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) %]</li>[% END %]
329 [% IF basketgroup.billingplace %]<li><span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) %]</li>[% END %]
331 [% IF ( CAN_user_acquisition_group_manage ) %]
339 [% IF ( duplinbatch ) %]<div class="dialog alert">
340 <h4>Duplicate warning</h4>
341 <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>
344 <div id="acqui_basket_content" class="yui-g">
345 [% IF ( books_loop ) %]
347 <label for="show_all_details">
348 <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
355 <th class="anti-the">Order</th>
356 <th class="tax_excluded">RRP tax exc.</th>
357 <th class="tax_excluded">ecost tax exc.</th>
358 <th class="tax_included">RRP tax inc.</th>
359 <th class="tax_included">ecost tax inc.</th>
361 <th class="tax_excluded">Total tax exc. ([% currency %])</th>
362 <th class="tax_included">Total tax inc. ([% currency %])</th>
366 <th>Supplier report</th>
368 [% UNLESS ( closedate ) %]
370 <th>Cancel order</th>
376 [% FOREACH foot_loo IN book_foot_loop %]
379 <th>Total (GST [% foot_loo.tax_rate * 100 %])</th>
380 <th class="tax_excluded"> </th>
381 <th class="tax_excluded"> </th>
382 <th class="tax_included"> </th>
383 <th class="tax_included"> </th>
384 <th>[% foot_loo.quantity %]</th>
385 <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th>
386 <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
388 <th>[% foot_loo.tax_value | $Price %]</th>
392 [% UNLESS ( closedate ) %]
401 <th>Total ([% currency %])</th>
402 <th class="tax_excluded"> </th>
403 <th class="tax_excluded"> </th>
404 <th class="tax_included"> </th>
405 <th class="tax_included"> </th>
406 <th>[% total_quantity %]</th>
407 <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
408 <th class="tax_included">[% total_tax_included | $Price %]</th>
410 <th>[% total_tax_value | $Price %]</th>
414 [% UNLESS ( closedate ) %]
422 [% FOREACH books_loo IN books_loop %]
423 [% IF ( books_loo.order_received ) %]
424 <tr class="disabled">
429 [% books_loo.ordernumber %]
433 [% IF ( books_loo.order_received ) %] (rcvd)[% END %]
434 [% IF books_loo.title %]
435 <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 %]
437 <em>Deleted bibliographic record, can't find title</em><br />
440 [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
441 [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
442 [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
443 [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %]
444 [% ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate %][% END %]
445 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
446 [% IF ( books_loo.suggestionid ) %]
448 Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
449 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&op=show">suggestion #[% books_loo.suggestionid %]</a>)
452 [% IF ( books_loo.order_internalnote ) %]
453 <p class="ordernote"><strong>Internal note: </strong><span id="internal-note-[% books_loo.ordernumber %]">[% books_loo.order_internalnote|html %]</span> <a class="edit_note" data-ordernumber="[% books_loo.ordernumber %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=internal" title="Edit internal note"><i class="fa fa-pencil"></i> Edit internal note</a></p>
455 <a class="edit_note" data-ordernumber="[% books_loo.ordernumber %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=internal" title="Add internal note"><i class="fa fa-plus"></i> Add internal note</a>
457 [% IF ( books_loo.order_vendornote ) %]
458 <p class="ordernote"><strong>Vendor note: </strong> <span id="vendor-note-[% books_loo.ordernumber %]">[% books_loo.order_vendornote|html %]</span> <a class="edit_note" data-ordernumber="[% books_loo.ordernumber %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=vendor" title="Edit vendor note"><i class="fa fa-pencil"></i> Edit vendor note</a></p>
460 <a class="edit_note" data-ordernumber="[% books_loo.ordernumber %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=vendor" title="Add vendor note"><i class="fa fa-plus"></i> Add vendor note</a>
462 [% IF (books_loo.transferred_from) %]
463 [% basket = books_loo.transferred_from.basket %]
464 [% bookseller = books_loo.transferred_from.bookseller %]
465 [% timestamp = books_loo.transferred_from.timestamp %]
466 <p>Transferred from basket:
467 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"> [% basket.basketname %]</a>
468 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
469 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
470 [% timestamp | $KohaDates %]
475 [% 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 ... %]
476 [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
477 <td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td>
478 <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td>
479 <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
480 <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
481 <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
482 <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
483 <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
484 <td class="number">[% books_loo.tax_rate * 100 %]</td>
485 <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
486 <td>[% books_loo.budget_name %]</td>
487 <td>[% books_loo.suppliers_report %]</td>
489 [% UNLESS ( closedate ) %]
491 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Modify</a>
492 [% UNLESS (books_loo.order_received) %]
494 <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber %]">Transfer</a>
498 [% IF ( books_loo.left_holds_on_order ) %]
499 <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>
501 <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>
503 [% IF ( books_loo.can_del_bib ) %]
504 <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>
506 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
508 [% IF ( books_loo.left_item ) %]
509 <b title="Can't delete catalog record, because of [% books_loo.items %] existing hold(s)" >[% books_loo.items %] item(s) left</b><br>
511 [% IF ( books_loo.left_biblio ) %]
512 <b title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios %] order(s) left</b><br>
514 [% IF ( books_loo.left_subscription ) %]
515 <b title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions %] subscription(s) left</b><br>
517 [% IF ( books_loo.left_holds ) %]
518 <b title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds %] hold(s) left</b>
528 [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
531 [% IF (cancelledorders_loop) %]
532 <div id="cancelledorders">
533 <h2>Cancelled orders</h2>
534 <table id="cancelledorderst">
539 <th class="tax_excluded">RRP tax exc.</th>
540 <th class="tax_excluded">ecost tax exc.</th>
541 <th class="tax_included">RRP tax inc.</th>
542 <th class="tax_included">ecost tax inc.</th>
544 <th class="tax_excluded">Total tax exc. ([% currency %])</th>
545 <th class="tax_included">Total tax inc. ([% currency %])</th>
552 [% FOREACH order IN cancelledorders_loop %]
553 <tr style="color:grey">
555 [% order.ordernumber %]
559 [% IF ( order.order_received ) %] (rcvd)[% END %]
560 [% IF (order.title) %]
561 [% order.title |html %][% IF order.author %] by [% order.author %][% END %]
563 <em>Deleted bibliographic record, can't find title</em>
566 [% IF ( order.order_internalnote ) %] [% order.order_internalnote %][% END %]
567 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
568 [% IF ( order.issn ) %] - [% order.issn %][% END %]
569 [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
570 [% IF ( order.publicationyear ) %], [% order.publicationyear %]
571 [% ELSIF ( order.copyrightdate ) %] [% order.copyrightdate %][% END %]
572 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
573 [% IF ( order.cancellationreason ) %]
575 Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) %]
578 [% IF order.transferred_to %]
579 [% basket = order.transferred_to.basket %]
580 [% bookseller = order.transferred_to.bookseller %]
581 [% timestamp = order.transferred_to.timestamp %]
582 <p>Transferred to basket:
583 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"> [% basket.basketname %]</a>
584 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
585 on <span title="[% timestamp | $KohaDates with_hours = 1%]">
586 [% timestamp | $KohaDates %]
591 <td class="number tax_excluded">[% order.rrp_tax_excluded | $Price %]</td>
592 <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td>
593 <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td>
594 <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td>
595 <td class="number">[% order.quantity %]</td>
596 <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
597 <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
598 <td class="number">[% order.tax_rate * 100 %]</td>
599 <td class="number">[% order.tax_value | $Price %]</td>
600 <td>[% order.budget_name %]
608 [% UNLESS ( closedate ) %]
611 <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
612 <div class="modal-dialog">
613 <div class="modal-content">
614 <div class="modal-body">
616 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
619 <div class="modal-footer">
620 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
629 [% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
631 [% IF ( confirm_close ) %]
632 <div id="closebasket_needsconfirmation" class="dialog alert">
634 <form action="/cgi-bin/koha/acqui/basket.pl">
635 <h1>Are you sure you want to close basket [% basketname|html %]?</h1>
636 [% IF ( CAN_user_acquisition_group_manage ) %]
638 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
639 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
642 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
643 <input type="hidden" value="close" name="op" />
644 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
645 <input type="hidden" name="confirm" value="1" />
646 <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
647 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
649 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
650 <input type="hidden" name="basketno" value="[% basketno %]" />
651 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
656 <div id="closebasket_needsconfirmation" class="dialog alert">
658 <form action="/cgi-bin/koha/acqui/basket.pl">
659 <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname|html %]?</h1>
660 [% IF CAN_user_acquisition_group_manage %]
662 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
663 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
666 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
667 <input type="hidden" value="ediorder" name="op" />
668 <input type="hidden" name="ean" value="[% ean %]" />
669 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
670 <input type="hidden" name="confirm" value="1" />
671 <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
672 <button type="submit" class="approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
674 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
675 <input type="hidden" name="basketno" value="[% basketno %]" />
676 <button type="submit" class="deny" accesskey="N"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
681 [% END %][%# IF (cannot_manage_basket) %]
684 [% INCLUDE 'acquisitions-menu.inc' %]
688 <!-- Modal for editing vendor and internal notes -->
689 <div class="modal" id="noteEditor" tabindex="-1" role="dialog" aria-labelledby="noteEditorLabel">
690 <div class="modal-dialog" role="document">
691 <form id="modify_order_notes" action="/cgi-bin/koha/acqui/modordernotes.pl" method="post">
692 <div class="modal-content">
693 <div class="modal-header">
694 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
695 <h4 class="modal-title" id="noteEditorLabel">Order note</h4>
697 <div class="modal-body">
698 <textarea id="ordernotes" name="ordernotes" rows="3" cols="30" class="focus">[% ordernotes %]</textarea>
699 <input type="hidden" id="ordernumber" name="ordernumber" value="" />
700 <input type="hidden" name="op" value="save" />
701 <input type="hidden" id="type" name="type" value="" />
703 <div class="modal-footer">
704 <button type="submit" class="btn btn-default">Save</button>
705 <button type="button" class="btn btn-link cancel" data-dismiss="modal">Cancel</button>
712 [% MACRO jsinclude BLOCK %]
713 [% Asset.js("js/acquisitions-menu.js") %]
714 [% INCLUDE 'datatables.inc' %]
715 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
716 <script type="text/javascript">
717 function updateColumnsVisibility(visible) {
719 $("table .tax_excluded, .tax_included").show();
721 [% IF ( listincgst ) %]
722 $("table .tax_excluded").hide();
724 $("table .tax_included").hide();
729 $(document).ready(function() {
730 if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
731 $("#show_all_details").click(function(){
732 updateColumnsVisibility($(this).is(":checked"));
735 $("#show_all_details").prop('checked', false);
736 updateColumnsVisibility(false);
737 [% UNLESS ( closedate ) %]
738 $('#addtoBasket').on('show', function () {
739 $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
743 $("body").on("click", ".del_user", function(e){
745 del_user( $(this).data("borrowernumber") );
748 $("#add_user").on("click",function(e){
753 $(".transfer_order").on("click",function(e){
755 transfer_order_popup( $(this).data("ordernumber"));
758 $(".edit_note").on("click", function(e) {
760 var ordernumber = $(this).data("ordernumber");
761 var note_type = $(this).data("note_type");
762 var modalTitle = $(this).attr("title") + " (order number " + ordernumber + ")";
763 var note_text = $( "#" + note_type + "-note-" + ordernumber ).html();
764 $("#noteEditor .modal-title").text(modalTitle);
765 $("#ordernumber").val( ordernumber );
766 $("#ordernotes").html( note_text );
767 $("#type").val( note_type );
768 $("#noteEditor").modal("show");
769 $("#ordernotes").focus();
772 $("#noteEditor").on('hidden.bs.modal', function (e) {
773 $("#noteEditorLabel").html("");
774 $("#noteEditor .modal-title").text("");
775 $("#ordernotes").html( "" );
776 $("#ordernumber").val("");
783 [% UNLESS ( closedate ) %]
784 <script type="text/javascript">
785 function transfer_order_popup(ordernumber) {
786 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
787 + "ordernumber=" + ordernumber
788 window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
791 function confirm_ediorder() {
792 var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
794 window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]";
799 <script type="text/javascript">
800 $(document).ready(function(){
801 $("#basketgroupid").change(function(){
802 if($(this).val() == "new"){
803 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
808 [% UNLESS ( grouped ) %]
809 <script type="text/javascript">
810 function confirm_reopen() {
811 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
812 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
814 window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]";
820 <script type="text/javascript">
821 $(document).ready(function() {
822 var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
823 "sPaginationType": "four_button",
826 [% UNLESS ( closedate ) %]
827 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
829 { "sType": "anti-the", "aTargets": [ "anti-the" ] }
833 var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
834 "sPaginationType": "four_button"
836 $("#reopenbutton").on("click",function(e){
840 // Generates a dynamic link for exporting the selections data as CSV
841 $("#exportbutton, #export-csv-menu a").click(function() {
842 // Building the url from currently checked boxes
843 var url = '/cgi-bin/koha/acqui/basket.pl';
844 url += $('#exportbutton').attr('href');
845 if($(this).attr("data-value")) {
846 url += '&csv_profile=' + $(this).attr("data-value");
848 // And redirecting to the CSV page
854 function UserSearchPopup(f) {
856 "/cgi-bin/koha/acqui/add_user_search.pl",
858 'width=840, height=500, scrollbars=yes, toolbar=no,'
862 function add_user(borrowernumber, borrowername) {
863 var ids = $("#users_ids").val();
865 ids = ids.split(':');
869 if (ids.indexOf(borrowernumber.toString()) < 0) {
870 ids.push(borrowernumber);
871 $("#users_ids").val(ids.join(':'));
872 var li = '<li id="user_'+borrowernumber+'">'+borrowername
873 + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
874 + _("Delete user") + '</a></li>';
875 $("#users_names").append(li);
881 function del_user(borrowernumber) {
882 $("#user_"+borrowernumber).remove();
883 var ids = $("#users_ids").val().split(':');
884 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
885 $("#users_ids").val(ids.join(':'));
890 [% INCLUDE 'intranet-bottom.inc' %]