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.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>
66 <div class="btn-group">
67 <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>
71 [% PROCESS csv_export %]
74 <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>
77 [% IF ( active && books_loop ) %]
78 <div class="btn-group">
79 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
80 <input type="hidden" name="op" value="email" />
81 <input type="hidden" name="basketno" value="[% basketno %]" />
82 <button type="submit" class="btn btn-default btn-sm" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
89 <!-- Modal for confirm deletion box-->
90 <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
91 <div class="modal-dialog">
92 <div class="modal-content">
93 <div class="modal-header">
94 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
95 <h3>Confirm deletion</h3>
97 [% UNLESS book_foot_loop %]
98 <div class="modal-body">
99 <p>Are you sure you want to delete this basket?</p>
101 <div class="modal-footer">
102 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
103 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
104 <input type="hidden" name="op" value="delete_confirm" />
105 <input type="hidden" name="basketno" value="[% basketno %]" />
106 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
107 <input type="hidden" name="delbiblio" value="0" />
108 <button type="submit" class="btn btn-default btn-default">Delete basket</button>
112 <div class="modal-body">
113 <p>Are you sure you want to delete this basket?</p>
115 <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
116 <p>If items have been created when ordering or receiving, they will be deleted.</p>
117 <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>
119 <div class="modal-footer">
120 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
121 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
122 <input type="hidden" name="op" value="delete_confirm" />
123 <input type="hidden" name="basketno" value="[% basketno %]" />
124 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
125 <input type="hidden" name="delbiblio" value="0" />
126 <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
129 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
130 <input type="hidden" name="op" value="delete_confirm" />
131 <input type="hidden" name="basketno" value="[% basketno %]" />
132 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
133 <input type="hidden" name="delbiblio" value="1" />
134 <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
144 [% UNLESS ( grouped ) %]
145 <div id="toolbar" class="btn-toolbar">
147 <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>
149 [% PROCESS csv_export %]
156 [% IF ( NO_BOOKSELLER ) %]
157 <h2>Vendor not found</h2>
159 [% IF ( delete_confirmed ) %]
160 <div class="dialog message">
161 <h3>Basket deleted</h3>
163 [% IF (cannotdelbiblios) %]
164 <div class="dialog alert">
165 <p><strong>Warning:</strong></p>
166 <p><strong>The following records could not be deleted:</strong></p>
168 [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
169 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber %]">[% cannotdelbiblio.title |html %]</a> by [% cannotdelbiblio.author %]:
171 [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount %] item(s) attached.</li>[% END %]
172 [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions %] subscription(s) attached.</li>[% END %]
173 [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio %] order(s) attached.</li>[% END %]
174 [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
180 <a href="booksellers.pl">Click here to go back to booksellers page</a>
182 <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>
186 [% FOR m IN messages %]
187 <div class="dialog [% m.type %]">
189 [% CASE 'no_email' %]
190 This vendor has no contact selected for sending orders to or is missing an e-mail address.
191 [% CASE 'no_basketno' %]
193 [% CASE 'no_letter' %]
194 There is no notice template with code ACQORDER defined.
195 [% CASE 'email_sent' %]
196 Order e-mail was sent to the vendor.
198 ERROR! - [% m.code %]
202 <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% booksellername|html %]</a></h1>
203 [% IF ( basketno ) %]
204 <div id="acqui_basket_summary" class="yui-g">
206 <div class="yui-u first">
208 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote |html %]</li>[% END %]
209 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote |html %]</li>[% END %]
210 [% IF ( basketcontractno ) %]
211 <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]&booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
213 [% IF deliveryplace %]<li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) %]</li>[% END %]
214 [% IF billingplace %]<li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) %]</li>[% END %]
215 [% IF ( authorisedbyname ) %]<li><span class="label">Created by:</span> [% authorisedbyname %]</li>[% END %]
217 <form action="" method="post">
218 <span class="label">Managed by:</span>
219 <div style="float:left">
220 <ul id="users_names" style="padding-left:0">
221 [% FOREACH user IN users %]
222 <li id="user_[% user.borrowernumber %]">
223 [% user.firstname %] [% user.surname %]
224 <a href="#" data-borrowernumber="[% user.borrowernumber %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a>
228 <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
229 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids %]" />
230 <input type="hidden" id="op" name="op" value="mod_users" />
231 <input type="button" id="add_user" value="Add user" />
232 <input type="submit" value="Save changes" />
237 <span class="label">Library:</span>
238 [% IF basketbranchcode %]
239 [% Branches.GetName( basketbranchcode ) %]
243 [% IF branches_loop.size %]
244 <form action="" method="post">
245 <select id="branch" name="branch">
246 <option value="">(no library)</option>
247 [% FOREACH branch IN branches_loop %]
248 [% IF (branch.selected) %]
249 <option selected="selected" value="[% branch.branchcode %]"> [% branch.branchname %]</option>
251 <option value="[% branch.branchcode %]"> [% branch.branchname %]</option>
255 <input type="hidden" id="basketno" name="basketno" value="[% basketno %]" />
256 <input type="hidden" id="op" name="op" value="mod_branch" />
257 <input type="submit" value="Change" />
261 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>[% END %]
262 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %]
263 [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>[% END %]
264 <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
266 [% IF basket.create_items %]
268 <span class="label">Create items when:</span>
269 [% SWITCH basket.create_items %]
270 [% CASE 'receiving' %]Receiving items
271 [% CASE 'cataloguing' %]Cataloguing items
272 [% CASE %]Placing orders
279 [% IF ( closedate ) %]
281 [% IF ( CAN_user_acquisition_group_manage ) %]
282 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
286 <span class="label">Basket group:</span>
287 [% IF basketgroup.id and not basketgroup.name %]
288 [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
290 [% IF basketgroup.closed %]
291 [% IF ( CAN_user_acquisition_group_manage ) %]
292 <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid %]&basketgroupid=[% basketgroup.id %]" title="basketgroup">[% basketgroup.name %] (closed)</a>
294 [% basketgroup.name %] (closed)
296 [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
297 [%- IF basketgroup.id -%]
298 [% basketgroup.name %]
303 <select id="basketgroupid" name="basketgroupid">
304 <option value="">No group</option>
305 [% FOREACH bg IN basketgroups %]
306 [% IF ( bg.default ) %]
307 <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
309 [% UNLESS bg.closed %]
310 <option value="[% bg.id %]">[% bg.name %]</option>
312 <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
316 <option value="new">Add new group</option>
318 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
319 <input type="hidden" value="mod_basket" name="op" />
320 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
321 <input type="submit" value="Change basket group" />
324 [% IF basketgroup.deliveryplace %]<li><span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) %]</li>[% END %]
325 [% IF basketgroup.billingplace %]<li><span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) %]</li>[% END %]
327 [% IF ( CAN_user_acquisition_group_manage ) %]
335 [% IF ( duplinbatch ) %]<div class="dialog alert">
336 <h4>Duplicate warning</h4>
337 <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>
340 <div id="acqui_basket_content" class="yui-g">
341 [% IF ( books_loop ) %]
343 <label for="show_all_details">
344 <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
351 <th class="anti-the">Order</th>
352 <th class="tax_excluded">RRP tax exc.</th>
353 <th class="tax_excluded">ecost tax exc.</th>
354 <th class="tax_included">RRP tax inc.</th>
355 <th class="tax_included">ecost tax inc.</th>
357 <th class="tax_excluded">Total tax exc. ([% currency %])</th>
358 <th class="tax_included">Total tax inc. ([% currency %])</th>
362 <th>Supplier report</th>
364 [% UNLESS ( closedate ) %]
366 <th>Cancel order</th>
372 [% FOREACH foot_loo IN book_foot_loop %]
375 <th>Total (GST [% foot_loo.tax_rate * 100 %])</th>
376 <th class="tax_excluded"> </th>
377 <th class="tax_excluded"> </th>
378 <th class="tax_included"> </th>
379 <th class="tax_included"> </th>
380 <th>[% foot_loo.quantity %]</th>
381 <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th>
382 <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
384 <th>[% foot_loo.tax_value | $Price %]</th>
388 [% UNLESS ( closedate ) %]
397 <th>Total ([% currency %])</th>
398 <th class="tax_excluded"> </th>
399 <th class="tax_excluded"> </th>
400 <th class="tax_included"> </th>
401 <th class="tax_included"> </th>
402 <th>[% total_quantity %]</th>
403 <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
404 <th class="tax_included">[% total_tax_included | $Price %]</th>
406 <th>[% total_tax_value | $Price %]</th>
410 [% UNLESS ( closedate ) %]
418 [% FOREACH books_loo IN books_loop %]
419 [% IF ( books_loo.order_received ) %]
420 <tr class="disabled">
425 [% books_loo.ordernumber %]
429 [% IF ( books_loo.order_received ) %] (rcvd)[% END %]
430 [% IF books_loo.title %]
431 <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 %]
433 <em>Deleted bibliographic record, can't find title</em><br />
436 [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
437 [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
438 [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
439 [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %]
440 [% ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate %][% END %]
441 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
442 [% IF ( books_loo.suggestionid ) %]
444 Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
445 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&op=show">suggestion #[% books_loo.suggestionid %]</a>)
448 [% IF ( books_loo.order_internalnote ) %]
449 <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>
451 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=internal">Add internal note</a>]
453 [% IF ( books_loo.order_vendornote ) %]
454 <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>
456 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]&type=vendor">Add vendor note</a>]
458 [% IF (books_loo.transferred_from) %]
459 [% basket = books_loo.transferred_from.basket %]
460 [% bookseller = books_loo.transferred_from.bookseller %]
461 [% timestamp = books_loo.transferred_from.timestamp %]
462 <p>Transferred from basket:
463 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"> [% basket.basketname %]</a>
464 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
465 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
466 [% timestamp | $KohaDates %]
471 [% 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 ... %]
472 [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
473 <td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td>
474 <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td>
475 <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
476 <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
477 <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
478 <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
479 <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
480 <td class="number">[% books_loo.tax_rate * 100 %]</td>
481 <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
482 <td>[% books_loo.budget_name %]</td>
483 <td>[% books_loo.suppliers_report %]</td>
485 [% UNLESS ( closedate ) %]
487 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Modify</a>
488 [% UNLESS (books_loo.order_received) %]
490 <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber %]">Transfer</a>
494 [% IF ( books_loo.left_holds_on_order ) %]
495 <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>
497 <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>
499 [% IF ( books_loo.can_del_bib ) %]
500 <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>
502 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
504 [% IF ( books_loo.left_item ) %]
505 <b title="Can't delete catalog record, because of [% books_loo.items %] existing hold(s)" >[% books_loo.items %] item(s) left</b><br>
507 [% IF ( books_loo.left_biblio ) %]
508 <b title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios %] order(s) left</b><br>
510 [% IF ( books_loo.left_subscription ) %]
511 <b title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions %] subscription(s) left</b><br>
513 [% IF ( books_loo.left_holds ) %]
514 <b title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds %] hold(s) left</b>
524 [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
527 [% IF (cancelledorders_loop) %]
528 <div id="cancelledorders">
529 <h2>Cancelled orders</h2>
530 <table id="cancelledorderst">
535 <th class="tax_excluded">RRP tax exc.</th>
536 <th class="tax_excluded">ecost tax exc.</th>
537 <th class="tax_included">RRP tax inc.</th>
538 <th class="tax_included">ecost tax inc.</th>
540 <th class="tax_excluded">Total tax exc. ([% currency %])</th>
541 <th class="tax_included">Total tax inc. ([% currency %])</th>
548 [% FOREACH order IN cancelledorders_loop %]
549 <tr style="color:grey">
551 [% order.ordernumber %]
555 [% IF ( order.order_received ) %] (rcvd)[% END %]
556 [% IF (order.title) %]
557 [% order.title |html %][% IF order.author %] by [% order.author %][% END %]
559 <em>Deleted bibliographic record, can't find title</em>
562 [% IF ( order.order_internalnote ) %] [% order.order_internalnote %][% END %]
563 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
564 [% IF ( order.issn ) %] - [% order.issn %][% END %]
565 [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
566 [% IF ( order.publicationyear ) %], [% order.publicationyear %]
567 [% ELSIF ( order.copyrightdate ) %] [% order.copyrightdate %][% END %]
568 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
569 [% IF ( order.cancellationreason ) %]
571 Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) %]
574 [% IF order.transferred_to %]
575 [% basket = order.transferred_to.basket %]
576 [% bookseller = order.transferred_to.bookseller %]
577 [% timestamp = order.transferred_to.timestamp %]
578 <p>Transferred to basket:
579 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"> [% basket.basketname %]</a>
580 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
581 on <span title="[% timestamp | $KohaDates with_hours = 1%]">
582 [% timestamp | $KohaDates %]
587 <td class="number tax_excluded">[% order.rrp_tax_excluded | $Price %]</td>
588 <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td>
589 <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td>
590 <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td>
591 <td class="number">[% order.quantity %]</td>
592 <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
593 <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
594 <td class="number">[% order.tax_rate * 100 %]</td>
595 <td class="number">[% order.tax_value | $Price %]</td>
596 <td>[% order.budget_name %]
604 [% UNLESS ( closedate ) %]
607 <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
608 <div class="modal-dialog">
609 <div class="modal-content">
610 <div class="modal-body">
612 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
615 <div class="modal-footer">
616 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
625 [% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
627 [% IF ( confirm_close ) %]
628 <div id="closebasket_needsconfirmation" class="dialog alert">
630 <form action="/cgi-bin/koha/acqui/basket.pl">
631 <h1>Are you sure you want to close basket [% basketname|html %]?</h1>
632 [% IF ( CAN_user_acquisition_group_manage ) %]
634 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
635 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
638 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
639 <input type="hidden" value="close" name="op" />
640 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
641 <input type="hidden" name="confirm" value="1" />
642 <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
643 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
645 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
646 <input type="hidden" name="basketno" value="[% basketno %]" />
647 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
652 <div id="closebasket_needsconfirmation" class="dialog alert">
654 <form action="/cgi-bin/koha/acqui/basket.pl">
655 <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname|html %]?</h1>
656 [% IF CAN_user_acquisition_group_manage %]
658 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
659 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
662 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
663 <input type="hidden" value="ediorder" name="op" />
664 <input type="hidden" name="ean" value="[% ean %]" />
665 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
666 <input type="hidden" name="confirm" value="1" />
667 <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
668 <button type="submit" class="approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
670 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
671 <input type="hidden" name="basketno" value="[% basketno %]" />
672 <button type="submit" class="deny" accesskey="N"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
677 [% END %][%# IF (cannot_manage_basket) %]
680 [% INCLUDE 'acquisitions-menu.inc' %]
684 [% MACRO jsinclude BLOCK %]
685 <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu.js"></script>
686 [% INCLUDE 'datatables.inc' %]
687 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
688 <script type="text/javascript">
689 function updateColumnsVisibility(visible) {
691 $("table .tax_excluded, .tax_included").show();
693 [% IF ( listincgst ) %]
694 $("table .tax_excluded").hide();
696 $("table .tax_included").hide();
701 $(document).ready(function() {
702 if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
703 $("#show_all_details").click(function(){
704 updateColumnsVisibility($(this).is(":checked"));
707 $("#show_all_details").prop('checked', false);
708 updateColumnsVisibility(false);
709 [% UNLESS ( closedate ) %]
710 $('#addtoBasket').on('show', function () {
711 $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
715 $("body").on("click", ".del_user", function(e){
717 del_user( $(this).data("borrowernumber") );
720 $("#add_user").on("click",function(e){
725 $(".transfer_order").on("click",function(e){
727 transfer_order_popup( $(this).data("ordernumber"));
732 [% UNLESS ( closedate ) %]
733 <script type="text/javascript">
734 function transfer_order_popup(ordernumber) {
735 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
736 + "ordernumber=" + ordernumber
737 window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
740 function confirm_ediorder() {
741 var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
743 window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno |html %]";
748 <script type="text/javascript">
749 $(document).ready(function(){
750 $("#basketgroupid").change(function(){
751 if($(this).val() == "new"){
752 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
757 [% UNLESS ( grouped ) %]
758 <script type="text/javascript">
759 function confirm_reopen() {
760 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
761 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
763 window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno |html %]";
769 <script type="text/javascript">
770 $(document).ready(function() {
771 var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
772 "sPaginationType": "four_button",
775 [% UNLESS ( closedate ) %]
776 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
778 { "sType": "anti-the", "aTargets": [ "anti-the" ] }
782 var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
783 "sPaginationType": "four_button"
785 $("#reopenbutton").on("click",function(e){
789 // Generates a dynamic link for exporting the selections data as CSV
790 $("#exportbutton, #export-csv-menu a").click(function() {
791 // Building the url from currently checked boxes
792 var url = '/cgi-bin/koha/acqui/basket.pl';
793 url += $('#exportbutton').attr('href');
794 if($(this).attr("data-value")) {
795 url += '&csv_profile=' + $(this).attr("data-value");
797 // And redirecting to the CSV page
803 function UserSearchPopup(f) {
805 "/cgi-bin/koha/acqui/add_user_search.pl",
807 'width=840, height=500, scrollbars=yes, toolbar=no,'
811 function add_user(borrowernumber, borrowername) {
812 var ids = $("#users_ids").val();
814 ids = ids.split(':');
818 if (ids.indexOf(borrowernumber) < 0) {
819 ids.push(borrowernumber);
820 $("#users_ids").val(ids.join(':'));
821 var li = '<li id="user_'+borrowernumber+'">'+borrowername
822 + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
823 + _("Delete user") + '</a></li>';
824 $("#users_names").append(li);
830 function del_user(borrowernumber) {
831 $("#user_"+borrowernumber).remove();
832 var ids = $("#users_ids").val().split(':');
833 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
834 $("#users_ids").val(ids.join(':'));
839 [% INCLUDE 'intranet-bottom.inc' %]