3 [% PROCESS 'i18n.inc' %]
5 <div class="btn-group">
6 <a id="exportbutton" class="btn btn-default" href="[% script_name | url %]?op=export&basketno=[% basketno | uri %]&booksellerid=[% booksellerid | uri %]"><i class="fa fa-download"></i> Export as CSV</a>
7 <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
8 <ul class="dropdown-menu" id="export-csv-menu">
9 <li><a href="#">Default</a></li>
10 [% IF csv_profiles.count %]
11 [% FOR csv IN csv_profiles %]
12 <li><a href="#" data-value="[% csv.export_format_id | html %]">[% csv.profile | html %]</a></li>
21 [% USE AuthorisedValues %]
22 [% USE TablesSettings %]
23 [% SET footerjs = 1 %]
24 [% INCLUDE 'doc-head-open.inc' %]
25 <title>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for [% booksellername | html %] › Acquisitions › Koha</title>
26 [% INCLUDE 'doc-head-close.inc' %]
28 .sortmsg {font-size: 80%;}
32 <body id="acq_basket" class="acq">
33 [% INCLUDE 'header.inc' %]
34 [% INCLUDE 'acquisitions-search.inc' %]
36 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
39 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
42 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
45 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
48 <a href="#" aria-current="page">
49 [% UNLESS ( basketno ) %]
50 [% IF ( delete_confirmed ) %]
56 Basket [% basketname | html %]
58 ([% basketno | html %])
60 for [% booksellername | html %]
66 <div class="main container-fluid">
68 <div class="col-sm-10 col-sm-push-2">
71 [% IF (cannot_manage_basket) %]
72 <div class="dialog alert">You are not authorised to manage this basket.</div>
75 [% IF !confirm_close && !edi_confirm %]
76 [% UNLESS ( selectbasketg ) %]
77 [% UNLESS ( closedate ) %]
78 [% UNLESS ( delete_confirmed ) %]
79 <div id="toolbar" class="btn-toolbar fh-fixedHeader">
81 <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-default" data-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a></div>
83 <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&op=add_form" class="btn btn-default" id="basketheadbutton"><i class="fa fa-pencil"></i> Edit basket</a></div>
84 [% IF CAN_user_acquisition_delete_baskets %]
85 <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-default" data-toggle="modal" id="delbasketbutton"><i class="fa fa-trash"></i> Delete basket</a></div>
87 [% IF ( unclosable ) %]
88 [% ELSIF ( uncertainprices ) %]
89 <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&owner=1" class="btn btn-default" id="uncertpricesbutton"><i class="fa fa-usd"></i> Uncertain prices</a></div>
90 <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
91 <a href="" class="btn btn-default disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close basket</a>
94 <div class="btn-group">
95 <a href="/cgi-bin/koha/acqui/basket.pl?op=close&basketno=[% basketno | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="closebutton"><i class="fa fa-times-circle"></i> Close basket</a>
99 [% PROCESS csv_export %]
101 [% IF Koha.Preference('Edifact') && ediaccount %]
102 <div class="btn-group"><a href="/cgi-bin/koha/acqui/edi_ean.pl?op=ediorder&basketno=[% basketno | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="ediorderbutton"><i class="fa fa-download"></i> Create EDIFACT order</a></div>
105 [% IF ( active && books_loop ) %]
106 <div class="btn-group">
107 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
108 <input type="hidden" name="op" value="email" />
109 <input type="hidden" name="basketno" value="[% basketno | html %]" />
110 <button type="submit" class="btn btn-default" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
117 <!-- Modal for confirm deletion box-->
118 <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
119 <div class="modal-dialog">
120 <div class="modal-content">
121 <div class="modal-header">
122 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
123 <h3>Confirm deletion</h3>
125 [% UNLESS book_foot_loop %]
126 <div class="modal-body">
127 <p>Are you sure you want to delete this basket?</p>
129 <div class="modal-footer">
130 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
131 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
132 <input type="hidden" name="op" value="delete_confirm" />
133 <input type="hidden" name="basketno" value="[% basketno | html %]" />
134 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
135 <input type="hidden" name="delbiblio" value="0" />
136 <button type="submit" class="btn btn-default btn-default">Delete basket</button>
140 <div class="modal-body">
141 <p>Are you sure you want to delete this basket?</p>
143 <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
144 <p>If items have been created when ordering or receiving, they will be deleted.</p>
145 <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>
147 <div class="modal-footer">
148 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
149 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
150 <input type="hidden" name="op" value="delete_confirm" />
151 <input type="hidden" name="basketno" value="[% basketno | html %]" />
152 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
153 <input type="hidden" name="delbiblio" value="0" />
154 <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
157 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
158 <input type="hidden" name="op" value="delete_confirm" />
159 <input type="hidden" name="basketno" value="[% basketno | html %]" />
160 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
161 <input type="hidden" name="delbiblio" value="1" />
162 <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
172 <div id="toolbar" class="btn-toolbar">
174 <div title="Can not reopen baskets that are part of a basket group." class="btn-group">
175 <div class="btn-group"><a href="#" class="btn btn-default disabled" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen basket</a></div>
178 <div class="btn-group"><a href="#" class="btn btn-default" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen basket</a></div>
180 [% PROCESS csv_export %]
186 [% IF ( NO_BOOKSELLER ) %]
187 <h2>Vendor not found</h2>
189 [% IF ( delete_confirmed ) %]
190 <div class="dialog message">
191 <h3>Basket deleted</h3>
193 [% IF (cannotdelbiblios) %]
194 <div class="dialog alert">
195 <p><strong>Warning:</strong></p>
196 <p><strong>The following records could not be deleted:</strong></p>
198 [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
199 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber | uri %]">[% cannotdelbiblio.title | html %]</a> by [% cannotdelbiblio.author | html %]:
201 [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount | html %] item(s) attached.</li>[% END %]
202 [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions | html %] subscription(s) attached.</li>[% END %]
203 [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio | html %] order(s) attached.</li>[% END %]
204 [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
210 <a href="booksellers.pl">Go back to vendor page</a>
212 <a href="/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid | uri %]" 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>
216 [% FOR m IN messages %]
217 <div class="dialog [% m.type | html %]">
219 [% CASE 'no_email' %]
220 This vendor has no contact selected for sending orders to or is missing an e-mail address.
221 [% CASE 'no_basketno' %]
223 [% CASE 'no_letter' %]
224 There is no notice template with code ACQORDER defined.
225 [% CASE 'email_sent' %]
226 Order e-mail was sent to the vendor.
228 ERROR! - [% m.code | html %]
232 <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for <a href="supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
233 [% IF ( basketno ) %]
234 <div id="acqui_basket_summary" class="row">
236 <div class="col-sm-6">
238 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
239 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
240 [% IF ( basketcontractno ) %]
241 <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno | uri %]&booksellerid=[% booksellerid | uri %]">[% basketcontractname | html %]</a></li>
243 [% IF deliveryplace %]<li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) | html %]</li>[% END %]
244 [% IF billingplace %]<li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) | html %]</li>[% END %]
245 [% IF ( authorisedbyname ) %]<li><span class="label">[% tp('basket created by', 'Created by:') | html %]</span> [% authorisedbyname | html %]</li>[% END %]
247 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
248 <span class="label">Managed by:</span>
249 <div style="float:left">
250 <ul id="users_names" style="padding-left:0">
251 [% FOREACH user IN users %]
252 <li id="user_[% user.borrowernumber | html %]">
253 [% user.firstname | html %] [% user.surname | html %]
254 <a href="#" data-borrowernumber="[% user.borrowernumber | html %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a>
258 <a href="#" id="add_user"><i class="fa fa-plus"></i> Add user</a>
260 <li id="add_user_submit" style="display:none;">
261 <button type="submit" class="btn btn-default btn-xs">Save changes</button>
265 <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
266 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
267 <input type="hidden" id="op" name="op" value="mod_users" />
272 <span class="label">Managing library:</span>
273 [% IF basketbranchcode %]
274 [% Branches.GetName( basketbranchcode ) | html %]
275 <a href="#" id="set_managing_library"><i class="fa fa-pencil"></i> Change library</a>
278 <a href="#" id="set_managing_library"><i class="fa fa-pencil"></i> Set library</a>
281 [% IF branches_loop.size %]
282 <li id="managing_library_entry" style="display:none;">
283 <span class="label"> </span>
284 <div style="float:left">
285 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
286 <select id="select_managing_library" name="branch">
287 <option value="">(no library)</option>
288 [% FOREACH branch IN branches_loop %]
289 [% IF ( basketbranchcode == branch.branchcode ) %]
290 <option selected="selected" value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
292 <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
296 <a id="library_entry_cancel" href="#" class="cancel">Cancel</a>
297 <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
298 <input type="hidden" id="op" name="op" value="mod_branch" />
304 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
307 </div> <!-- /.col-sm-6 -->
309 <div class="col-sm-6">
311 [% IF ( creationdate ) %]
312 <li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>
314 [% IF ( closedate ) %]
315 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
317 [% IF ( ediaccount ) %]
318 [%- BLOCK edi_status -%]
319 [%- SWITCH edi_order.status -%]
320 [%- CASE 'Pending' -%]Pending
321 [%- CASE 'Sent' -%]Sent
322 [%- CASE 'Processed' -%]Processed
325 [% IF ( edi_order ) %]
326 <li><span class="label">EDI status:</span> [%- PROCESS edi_status edi_order=edi_order -%] ([% edi_order.transfer_date | $KohaDates %])</li>
328 <li><span class="label">EDI status:</span> Not ordered</li>
331 [% IF ( estimateddeliverydate ) %]
332 <li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>
334 <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
336 [% IF basket.create_items %]
338 <span class="label">Create items when:</span>
339 [% SWITCH basket.create_items %]
340 [% CASE 'receiving' %]Receiving items
341 [% CASE 'cataloguing' %]Cataloguing items
342 [% CASE %]Placing orders
348 [% IF ( closedate ) %]
351 <span class="label">Basket group:</span>
352 [% IF basketgroup.id and not basketgroup.name %]
353 [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
356 [% IF basketgroup.closed %]
357 [% IF ( CAN_user_acquisition_group_manage ) %]
358 <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]" title="basketgroup">[% basketgroup.name | html %] (closed)</a>
360 [% basketgroup.name | html %] (closed)
362 [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
363 [%- IF basketgroup.id -%]
364 [% basketgroup.name | html %]
369 [% IF ( CAN_user_acquisition_group_manage ) %]
370 [% IF ( basketgroup.id ) %]
371 [% basketgroup.name | html %]
372 <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Change basket group</a>
375 <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Set basket group</a>
380 [% IF ( CAN_user_acquisition_group_manage ) %]
381 <li id="basket_grouping" style="display:none;">
382 <span class="label"> </span>
383 <div style="float:left">
384 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
385 <select id="basketgroupid" name="basketgroupid">
386 <option value="">No group</option>
387 [% FOREACH bg IN basketgroups %]
388 [% IF ( bg.default ) %]
389 <option value="[% bg.id | html %]" selected="selected">[% bg.name | html %]</option>
391 [% UNLESS bg.closed %]
392 <option value="[% bg.id | html %]">[% bg.name | html %]</option>
394 <option value="[% bg.id | html %]" disabled="disabled">[% bg.name | html %] (closed)</option>
398 <option value="new">Add new group</option>
400 <a href="#" id="basket_group_cancel" class="cancel">Cancel</a>
401 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
402 <input type="hidden" value="mod_basket" name="op" />
403 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
407 [% END # /IF ( CAN_user_acquisition_group_manage ) %]
408 [% IF basketgroup.deliveryplace %]
410 <span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) | html %]
413 [% IF basketgroup.billingplace %]
415 <span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) | html %]
419 [% END # /IF closeddate %]
420 </div> <!-- /.rows -->
421 </div> <!-- /.col-sm-6 -->
422 </div> <!-- /#acqui_basket_summary.row -->
424 [% IF ( duplinbatch ) %]<div class="dialog alert">
425 <h4>Duplicate warning</h4>
426 <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 | uri %]&basketno=[% basketno | uri %]&booksellerid=[% booksellerid | uri %]" title="Open in new window" target="_blank" style="margin-left:10px"><i class="fa fa-window-restore"></i> Display them</a></p>
429 <div id="acqui_basket_content">
430 [% IF ( books_loop ) %]
436 <th>[% tp('noun', 'Order') | html %]</th>
437 <th>RRP tax exc.</th>
438 <th>Actual cost tax exc.</th>
439 <th>Budgeted cost tax exc.</th>
440 <th>RRP tax inc.</th>
441 <th>Actual cost tax inc.</th>
442 <th>Budgeted cost tax inc.</th>
443 <th>Replacement price</th>
445 <th>Total tax exc. ([% currency | html %])</th>
446 <th>Total tax inc. ([% currency | html %])</th>
450 <th>Supplier report</th>
452 [% UNLESS ( closedate ) %]
453 <th class="NoSort">Modify</th>
454 <th class="NoSort">Cancel order</th>
460 [% FOREACH foot_loo IN book_foot_loop %]
463 <th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th>
471 <th>[% foot_loo.quantity | html %]</th>
472 <th>[% foot_loo.total_tax_excluded | $Price %]</th>
473 <th>[% foot_loo.total_tax_included | $Price %]</th>
475 <th>[% foot_loo.tax_value | $Price %]</th>
479 [% UNLESS ( closedate ) %]
488 <th>Total ([% currency | html %])</th>
496 <th>[% total_quantity | html %]</th>
497 <th>[% total_tax_excluded | $Price %]</th>
498 <th>[% total_tax_included | $Price %]</th>
500 <th>[% total_tax_value | $Price %]</th>
504 [% UNLESS ( closedate ) %]
512 [% FOREACH books_loo IN books_loop %]
513 [% IF ( books_loo.order_received ) %]
514 <tr class="disabled">
519 [% books_loo.ordernumber | html %]
523 [% IF ( books_loo.order_received ) %] <span class="order-received">(received)</span>[% END %]
524 [%- IF books_loo.title %]
525 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber | uri %]">[% books_loo.title | html %]</a>[% IF books_loo.author %] by [% books_loo.author | html %][% END -%]
527 <em>Deleted bibliographic record, can't find title</em><br />
530 [%- IF ( books_loo.isbn ) %] - [% books_loo.isbn | html %][% END -%]
531 [%- IF ( books_loo.issn ) %] - [% books_loo.issn | html %][% END -%]
532 [%- IF ( books_loo.publishercode ) %], [% books_loo.publishercode | html %][% END -%]
533 [%- IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear | html -%]
534 [%- ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate | html %][% END -%]
535 [%- IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END -%]
536 [%- IF ( books_loo.suggestionid ) %]
538 Suggested by: [% books_loo.surnamesuggestedby | html %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby | html %] [% END %]
539 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid | uri %]&op=show">suggestion #[% books_loo.suggestionid | html %]</a>)
542 [% IF ( books_loo.order_internalnote ) %]
543 <p class="ordernote"><strong>Internal note: </strong><span id="internal-note-[% books_loo.ordernumber | html %]">[% books_loo.order_internalnote | html %]</span> <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal" title="Edit internal note"><i class="fa fa-pencil"></i> Edit internal note</a></p>
545 <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="internal" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=internal" title="Add internal note"><i class="fa fa-plus"></i> Add internal note</a>
547 [% IF ( books_loo.order_vendornote ) %]
548 <p class="ordernote"><strong>Vendor note: </strong> <span id="vendor-note-[% books_loo.ordernumber | html %]">[% books_loo.order_vendornote | html %]</span> <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor" title="Edit vendor note"><i class="fa fa-pencil"></i> Edit vendor note</a></p>
550 <a class="edit_note noExport" data-ordernumber="[% books_loo.ordernumber | html %]" data-note_type="vendor" href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber | html %]&type=vendor" title="Add vendor note"><i class="fa fa-plus"></i> Add vendor note</a>
552 [% IF (books_loo.transferred_from) %]
553 [% basket = books_loo.transferred_from.basket %]
554 [% bookseller = books_loo.transferred_from.bookseller %]
555 [% timestamp = books_loo.transferred_from.timestamp %]
556 <p>Transferred from basket:
557 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
558 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>)
559 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
560 [% timestamp | $KohaDates %]
564 [% SET claims = books_loo.order_object.claims %]
565 [% IF claims.count %]
567 This order has been claimed [% claims.count | html %] times. On [% FOR c IN claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %]
571 [% 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 ... %]
572 [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
573 <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %] [% IF ( books_loo.uncertainprice ) %] (Uncertain) [% END %] </td>
574 <td class="number [% IF books_loo.unitprice_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.unitprice_tax_excluded | $Price %]</td>
575 <td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price %]</td>
576 <td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
577 <td class="number [% IF books_loo.unitprice_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.unitprice_tax_included | $Price %]</td>
578 <td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
579 <td class="number [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">[% books_loo.replacementprice | $Price %]</td>
580 <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | html %]</td>
581 <td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
582 <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
583 <td class="number">[% books_loo.tax_rate * 100 | html %]</td>
584 <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
585 <td>[% books_loo.budget_name | html %]</td>
586 <td>[% books_loo.suppliers_report | html %]</td>
588 [% UNLESS ( closedate ) %]
590 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Modify</a>
591 [% UNLESS (books_loo.order_received) %]
593 <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
597 [% IF ( books_loo.orderstatus != "complete") %]
598 [% IF ( books_loo.left_holds_on_order ) %]
599 <span class="button" title="Can't cancel order, ([% books_loo.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br>
601 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order</a><br>
603 [% IF ( books_loo.can_del_bib ) %]
604 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% books_loo.ordernumber | uri %]&biblionumber=[% books_loo.biblionumber | uri %]&basketno=[% basketno | uri %]&del_biblio=1&referrer=/cgi-bin/koha/acqui/basket.pl%3Fbasketno=[% basketno | uri %]" class="button">Cancel order and delete catalog record</a><br>
606 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
608 [% IF ( books_loo.left_item ) %]
609 <strong title="Can't delete catalog record, because of [% books_loo.items | html %] existing hold(s)" >[% books_loo.items | html %] item(s) left</strong><br>
611 [% IF ( books_loo.left_biblio ) %]
612 <strong title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios | html %] order(s) left</strong><br>
614 [% IF ( books_loo.left_subscription ) %]
615 <strong title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions | html %] subscription(s) left</strong><br>
617 [% IF ( books_loo.left_holds ) %]
618 <strong title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds | html %] hold(s) left</strong>
629 [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
631 </div> <!-- /#acqui_basket_content -->
632 [% IF (cancelledorders_loop) %]
633 <div id="cancelledorders">
634 <h2>Cancelled orders</h2>
635 <table id="cancelledorderst">
639 <th>[% tp('noun', 'Order') | html %]</th>
640 <th class="tax_excluded">RRP tax exc.</th>
641 <th class="tax_excluded">ecost tax exc.</th>
642 <th class="tax_included">RRP tax inc.</th>
643 <th class="tax_included">ecost tax inc.</th>
644 <th class="replacementprice">Replacement price</th>
646 <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
647 <th class="tax_included">Total tax inc. ([% currency | html %])</th>
654 [% FOREACH order IN cancelledorders_loop %]
655 <tr style="color:grey">
657 [% order.ordernumber | html %]
661 [% IF ( order.order_received ) %] <span class="order-received">(received)</span>[% END %]
662 [% IF (order.title) %]
663 [% order.title | html %][% IF order.author %] by [% order.author | html %][% END %]
665 <em>Deleted bibliographic record, can't find title</em>
668 [% IF ( order.order_internalnote ) %] [% order.order_internalnote | html %][% END %]
669 [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
670 [% IF ( order.issn ) %] - [% order.issn | html %][% END %]
671 [% IF ( order.publishercode ) %], [% order.publishercode | html %][% END %]
672 [% IF ( order.publicationyear ) %], [% order.publicationyear | html %]
673 [% ELSIF ( order.copyrightdate ) %] [% order.copyrightdate | html %][% END %]
674 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END %]
675 [% IF ( order.cancellationreason ) %]
677 Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) | html %]
680 [% IF order.transferred_to %]
681 [% basket = order.transferred_to.basket %]
682 [% bookseller = order.transferred_to.bookseller %]
683 [% timestamp = order.transferred_to.timestamp %]
684 <p>Transferred to basket:
685 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
686 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>)
687 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
688 [% timestamp | $KohaDates %]
694 [% order.rrp_tax_excluded | $Price %]
695 [% IF ( order.uncertain ) %]
699 <td class="number">[% order.ecost_tax_excluded | $Price %]</td>
700 <td class="number">[% order.rrp_tax_included | $Price %]</td>
701 <td class="number">[% order.ecost_tax_included | $Price %]</td>
702 <td class="number">[% order.replacementprice | $Price %]</td>
703 <td class="number">[% order.quantity | html %]</td>
704 <td class="number">[% order.total_tax_excluded | $Price %]</td>
705 <td class="number">[% order.total_tax_included | $Price %]</td>
706 <td class="number">[% order.tax_rate * 100 | html %]</td>
707 <td class="number">[% order.tax_value | $Price %]</td>
708 <td>[% order.budget_name | html %]
713 </div> <!-- /#cancelledorders -->
717 [% UNLESS ( closedate ) %]
719 <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true" data-basketno="[% basket.basketname | html %]">
720 <div class="modal-dialog" role="document">
721 <div class="modal-content">
722 <div class="modal-header">
723 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
724 <h4 class="modal-title" id="addtoBasketLabel">Add order to basket</h4>
726 <div class="modal-body">
728 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
731 <div class="modal-footer">
732 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
734 </div><!-- /.modal-content -->
735 </div><!-- /.modal-dialog -->
736 </div><!-- /.modal -->
740 [% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
742 [% IF ( confirm_close ) %]
743 <div id="closebasket_needsconfirmation" class="dialog alert">
745 <form action="/cgi-bin/koha/acqui/basket.pl">
746 <h1>Are you sure you want to close basket [% basketname | html %]?</h1>
747 [% IF ( CAN_user_acquisition_group_manage ) %]
749 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
750 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
753 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
754 <input type="hidden" value="close" name="op" />
755 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
756 <input type="hidden" name="confirm" value="1" />
757 <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
758 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
760 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
761 <input type="hidden" name="basketno" value="[% basketno | html %]" />
762 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
767 <div id="closebasket_needsconfirmation" class="dialog alert">
769 <form action="/cgi-bin/koha/acqui/basket.pl">
770 <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname | html %]?</h1>
771 [% IF CAN_user_acquisition_group_manage %]
773 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
774 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
777 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
778 <input type="hidden" value="ediorder" name="op" />
779 <input type="hidden" name="ean" value="[% ean | html %]" />
780 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
781 <input type="hidden" name="confirm" value="1" />
782 <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
783 <button type="submit" class="approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
785 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
786 <input type="hidden" name="basketno" value="[% basketno | html %]" />
787 <button type="submit" class="deny" accesskey="N"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
791 [% END %][%# IF (cannot_manage_basket) %]
794 </div> <!-- /.col-sm-10.col-sm-push-2 -->
796 <div class="col-sm-2 col-sm-pull-10">
798 [% INCLUDE 'vendor-menu.inc' %]
799 [% INCLUDE 'acquisitions-menu.inc' %]
801 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
802 </div> <!-- /.row -->
805 <!-- Modal for editing vendor and internal notes -->
806 <div class="modal" id="noteEditor" tabindex="-1" role="dialog" aria-labelledby="noteEditorLabel">
807 <div class="modal-dialog" role="document">
808 <form id="modify_order_notes" action="/cgi-bin/koha/acqui/modordernotes.pl" method="post">
809 <div class="modal-content">
810 <div class="modal-header">
811 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
812 <h4 class="modal-title" id="noteEditorLabel">Order note</h4>
814 <div class="modal-body">
815 <textarea id="ordernotes" name="ordernotes" rows="3" cols="30" class="focus">[% ordernotes | html %]</textarea>
816 <input type="hidden" id="ordernumber" name="ordernumber" value="" />
817 <input type="hidden" name="op" value="save" />
818 <input type="hidden" id="type" name="type" value="" />
820 <div class="modal-footer">
821 <button type="submit" class="btn btn-default">Save</button>
822 <button type="button" class="btn btn-link cancel" data-dismiss="modal">Cancel</button>
829 [% MACRO jsinclude BLOCK %]
830 [% Asset.js("js/acquisitions-menu.js") | $raw %]
831 [% INCLUDE 'datatables.inc' %]
832 [% INCLUDE 'columns_settings.inc' %]
833 [% Asset.js("lib/hc-sticky.js") | $raw %]
834 [% Asset.js("js/acq.js") | $raw %]
836 function updateColumnsVisibility(visible) {
838 $("table .tax_excluded, .tax_included").show();
840 [% IF ( listincgst ) %]
841 $("table .tax_excluded").hide();
843 $("table .tax_included").hide();
850 $(document).ready(function() {
851 if ( $('#toolbar').length ) {
852 Sticky = $("#toolbar");
855 stickyClass: "floating"
859 [% UNLESS ( closedate ) %]
860 $('#addtoBasket').on('show', function () {
861 $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
865 $("body").on("click", ".del_user", function(e){
867 del_user( $(this).data("borrowernumber") );
870 $("#add_user").on("click",function(e){
875 $(".transfer_order").on("click",function(e){
877 transfer_order_popup( $(this).data("ordernumber"));
880 $(".edit_note").on("click", function(e) {
882 var ordernumber = $(this).data("ordernumber");
883 var note_type = $(this).data("note_type");
884 var modalTitle = $(this).attr("title") + " (order number " + ordernumber + ")";
885 var note_text = $( "#" + note_type + "-note-" + ordernumber ).html();
886 $("#noteEditor .modal-title").text(modalTitle);
887 $("#ordernumber").val( ordernumber );
888 $("#ordernotes").html( note_text );
889 $("#type").val( note_type );
890 $("#noteEditor").modal("show");
891 $("#ordernotes").focus();
894 $("#noteEditor").on('hidden.bs.modal', function (e) {
895 $("#noteEditorLabel").html("");
896 $("#noteEditor .modal-title").text("");
897 $("#ordernotes").html( "" );
898 $("#ordernumber").val("");
902 $("#set_managing_library").on("click", function(e){
905 $("#managing_library_entry").show();
908 $("#library_entry_cancel").on("click", function(e){
910 $("#managing_library_entry").hide();
911 $("#set_managing_library").show();
914 $("#set_basket_group").on("click", function(e){
917 $("#basket_grouping").show();
920 $("#basket_group_cancel").on("click", function(e){
922 $("#basket_grouping").hide();
923 $("#set_basket_group").show();
926 $(".modal").on("shown.bs.modal", function(){
927 var basket = $(this).data("basketno");
928 var legend = _("Add order to basket %s").format(basket);
929 $(this).find("h4").text( legend );
930 $(this).find("legend").html(legend);
931 $(this).find("input:text").focus();
936 [% UNLESS ( closedate ) %]
938 function transfer_order_popup(ordernumber) {
939 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
940 + "ordernumber=" + ordernumber
941 window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
944 function confirm_ediorder() {
945 var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
947 window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno | html %]";
953 $(document).ready(function(){
954 $("#basketgroupid").change(function(){
955 if($(this).val() == "new"){
956 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | html %]";
958 $(this).parent().submit();
963 [% UNLESS ( grouped ) %]
965 function confirm_reopen() {
966 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
967 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
969 window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno | html %]";
976 var columns_settings = [% TablesSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
977 [% SET table_settings = TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders' ) %];
978 $(document).ready(function() {
979 KohaTable("orders", {
980 "sPaginationType": "full",
982 "exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13],
983 "iDisplayLength": [% table_settings.default_display_length | html %],
984 "order": [[ [% table_settings.default_sort_order | html %], 'asc']],
985 }, columns_settings);
987 var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
988 "sPaginationType": "full"
990 $("#reopenbutton").on("click",function(e){
994 // Generates a dynamic link for exporting the selections data as CSV
995 $("#exportbutton, #export-csv-menu a").click(function() {
996 // Building the url from currently checked boxes
997 var url = '/cgi-bin/koha/acqui/basket.pl';
998 url += $('#exportbutton').attr('href');
999 if($(this).attr("data-value")) {
1000 url += '&csv_profile=' + $(this).attr("data-value");
1002 // And redirecting to the CSV page
1003 location.href = url;
1006 $("#select_managing_library").on("change", function(){
1007 $(this).parent().submit();
1011 function UserSearchPopup(f) {
1013 "/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=add&filter=baskets_managers",
1015 'width=1024, height=768, scrollbars=yes, toolbar=no,'
1019 function add_user(borrowernumber, borrowername) {
1020 var ids = $("#users_ids").val();
1021 if(ids.length > 0) {
1022 ids = ids.split(':');
1026 if (ids.indexOf(borrowernumber.toString()) < 0) {
1027 ids.push(borrowernumber);
1028 $("#users_ids").val(ids.join(':'));
1029 var li = '<li id="user_'+borrowernumber+'">'+borrowername
1030 + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
1031 + _("Delete user") + '</a></li>';
1032 $("#users_names").prepend(li);
1033 $("#add_user_submit").show();
1039 function del_user(borrowernumber) {
1040 $("#user_"+borrowernumber).remove();
1041 var ids = $("#users_ids").val().split(':');
1042 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
1043 $("#users_ids").val(ids.join(':'));
1044 $("#add_user_submit").show();
1049 [% INCLUDE 'intranet-bottom.inc' %]