4 [% PROCESS 'i18n.inc' %]
6 <div class="btn-group">
7 <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>
8 <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
9 <ul class="dropdown-menu" id="export-csv-menu">
10 <li><a href="#">Default</a></li>
11 [% IF csv_profiles.count %]
12 [% FOR csv IN csv_profiles %]
13 <li><a href="#" data-value="[% csv.export_format_id | html %]">[% csv.profile | html %]</a></li>
22 [% USE AuthorisedValues %]
23 [% USE TablesSettings %]
24 [% SET footerjs = 1 %]
25 [% INCLUDE 'doc-head-open.inc' %]
26 <title>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for [% booksellername | html %] › Acquisitions › Koha</title>
27 [% INCLUDE 'doc-head-close.inc' %]
29 .sortmsg {font-size: 80%;}
33 <body id="acq_basket" class="acq">
34 [% INCLUDE 'header.inc' %]
35 [% INCLUDE 'acquisitions-search.inc' %]
37 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
40 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
43 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
46 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
49 <a href="#" aria-current="page">
50 [% UNLESS ( basketno ) %]
51 [% IF ( delete_confirmed ) %]
57 <span>Basket [% basketname | html %]
59 ([% basketno | html %])
61 for [% booksellername | html %]</span>
67 <div class="main container-fluid">
69 <div class="col-sm-10 col-sm-push-2">
72 [% IF (cannot_manage_basket) %]
73 <div class="dialog alert">You are not authorised to manage this basket.</div>
76 [% IF !confirm_close && !edi_confirm %]
77 [% UNLESS ( selectbasketg ) %]
78 [% UNLESS ( closedate ) %]
79 [% UNLESS ( delete_confirmed ) %]
80 <div id="toolbar" class="btn-toolbar fh-fixedHeader">
82 <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>
84 <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>
85 [% IF CAN_user_acquisition_delete_baskets %]
86 <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>
88 [% IF ( unclosable ) %]
89 [% ELSIF ( uncertainprices ) %]
90 <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>
91 <div title="Can not close baskets that have items with uncertain prices in them." class="btn-group">
92 <a href="" class="btn btn-default disabled" id="closebutton"><i class="fa fa-times-circle"></i> Close basket</a>
95 <div class="btn-group">
96 <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>
100 [% PROCESS csv_export %]
102 [% IF Koha.Preference('EDIFACT') && ediaccount %]
103 <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>
106 [% IF ( active && books_loop ) %]
107 <div class="btn-group">
108 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
109 <input type="hidden" name="op" value="email" />
110 <input type="hidden" name="basketno" value="[% basketno | html %]" />
111 <button type="submit" class="btn btn-default" id="emailvendorbutton"><i class="fa fa-envelope"></i> E-mail order</button>
118 <!-- Modal for confirm deletion box-->
119 <div class="modal" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
120 <div class="modal-dialog">
121 <div class="modal-content">
122 <div class="modal-header">
123 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
124 <h3>Confirm deletion</h3>
126 [% UNLESS book_foot_loop %]
127 <div class="modal-body">
128 <p>Are you sure you want to delete this basket?</p>
130 <div class="modal-footer">
131 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
132 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
133 <input type="hidden" name="op" value="delete_confirm" />
134 <input type="hidden" name="basketno" value="[% basketno | html %]" />
135 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
136 <input type="hidden" name="delbiblio" value="0" />
137 <button type="submit" class="btn btn-default btn-default">Delete basket</button>
141 <div class="modal-body">
142 <p>Are you sure you want to delete this basket?</p>
144 <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
145 <p>If items have been created when ordering or receiving, they will be deleted.</p>
146 <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>
148 <div class="modal-footer">
149 <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
150 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
151 <input type="hidden" name="op" value="delete_confirm" />
152 <input type="hidden" name="basketno" value="[% basketno | html %]" />
153 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
154 <input type="hidden" name="delbiblio" value="0" />
155 <button type="submit" class="btn btn-default btn-default">Delete basket and orders</button>
158 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
159 <input type="hidden" name="op" value="delete_confirm" />
160 <input type="hidden" name="basketno" value="[% basketno | html %]" />
161 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
162 <input type="hidden" name="delbiblio" value="1" />
163 <button type="submit" class="btn btn-default btn-default">Delete basket, orders, and records</button>
173 <div id="toolbar" class="btn-toolbar">
175 <div title="Can not reopen baskets that are part of a basket group." class="btn-group">
176 <div class="btn-group"><a href="#" class="btn btn-default disabled" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen basket</a></div>
179 <div class="btn-group"><a href="#" class="btn btn-default" id="reopenbutton"><i class="fa fa-refresh"></i> Reopen basket</a></div>
181 [% PROCESS csv_export %]
187 [% IF ( NO_BOOKSELLER ) %]
188 <h1>Vendor not found</h1>
190 [% IF ( delete_confirmed ) %]
191 <div class="dialog message">
192 <h3>Basket deleted</h3>
194 [% IF (cannotdelbiblios) %]
195 <div class="dialog alert">
196 <p><strong>Warning:</strong></p>
197 <p><strong>The following records could not be deleted:</strong></p>
199 [% FOREACH cannotdelbiblio IN cannotdelbiblios %]
200 <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cannotdelbiblio.biblionumber | uri %]">[% cannotdelbiblio.title | html %]</a> by [% cannotdelbiblio.author | html %]:
202 [% IF (cannotdelbiblio.itemcount) %]<li>[% cannotdelbiblio.itemcount | html %] item(s) attached.</li>[% END %]
203 [% IF (cannotdelbiblio.subscriptions) %]<li>[% cannotdelbiblio.subscriptions | html %] subscription(s) attached.</li>[% END %]
204 [% IF (cannotdelbiblio.countbiblio) %]<li>[% cannotdelbiblio.countbiblio | html %] order(s) attached.</li>[% END %]
205 [% IF (cannotdelbiblio.othererror) %]<li>Unknown error.</li>[% END %]
211 <a href="booksellers.pl">Go back to vendor page</a>
213 <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>
217 [% FOR m IN messages %]
218 <div class="dialog [% m.type | html %]">
220 [% CASE 'no_email' %]
221 <span>This vendor has no contact selected for sending orders to or is missing an e-mail address.</span>
222 [% CASE 'no_basketno' %]
223 <span>No basket given.</span>
224 [% CASE 'no_letter' %]
225 <span>There is no notice template with code ACQORDER defined.</span>
226 [% CASE 'email_sent' %]
227 <span>Order e-mail was sent to the vendor.</span>
229 <span>ERROR! - [% m.code | html %]</span>
233 <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for <a href="supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
234 [% IF ( basketno ) %]
235 <div id="acqui_basket_summary" class="row">
237 <div class="col-sm-6">
239 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote | html %]</li>[% END %]
240 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote | html %]</li>[% END %]
241 [% IF ( basketcontractno ) %]
242 <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>
244 [% IF deliveryplace %]<li><span class="label">Delivery place:</span> [% Branches.GetName( deliveryplace ) | html %]</li>[% END %]
245 [% IF billingplace %]<li><span class="label">Billing place:</span> [% Branches.GetName( billingplace ) | html %]</li>[% END %]
246 [% IF ( authorisedbyname ) %]<li><span class="label">[% tp('basket created by', 'Created by:') | html %]</span> [% authorisedbyname | html %]</li>[% END %]
248 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
249 <span class="label">Managed by:</span>
250 <div style="float:left">
251 <ul id="users_names" style="padding-left:0">
252 [% FOREACH user IN users %]
253 <li id="user_[% user.borrowernumber | html %]">
254 [% user.firstname | html %] [% user.surname | html %]
255 <a href="#" data-borrowernumber="[% user.borrowernumber | html %]" class="del_user"><i class="fa fa-trash"></i> Delete user</a>
259 <a href="#" id="add_user"><i class="fa fa-plus"></i> Add user</a>
261 <li id="add_user_submit" style="display:none;">
262 <button type="submit" class="btn btn-default btn-xs">Save changes</button>
266 <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
267 <input type="hidden" id="users_ids" name="users_ids" value="[% users_ids | html %]" />
268 <input type="hidden" id="op" name="op" value="mod_users" />
273 <span class="label">Managing library:</span>
274 [% IF basketbranchcode %]
275 [% Branches.GetName( basketbranchcode ) | html %]
276 <a href="#" id="set_managing_library"><i class="fa fa-pencil"></i> Change library</a>
279 <a href="#" id="set_managing_library"><i class="fa fa-pencil"></i> Set library</a>
282 [% IF branches_loop.size %]
283 <li id="managing_library_entry" style="display:none;">
284 <span class="label"> </span>
285 <div style="float:left">
286 <form action="/cgi-bin/koha/acqui/basket.pl" method="post">
287 <select id="select_managing_library" name="branch">
288 <option value="">(no library)</option>
289 [% FOREACH branch IN branches_loop %]
290 [% IF ( basketbranchcode == branch.branchcode ) %]
291 <option selected="selected" value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
293 <option value="[% branch.branchcode | html %]"> [% branch.branchname | html %]</option>
297 <a id="library_entry_cancel" href="#" class="cancel">Cancel</a>
298 <input type="hidden" id="basketno" name="basketno" value="[% basketno | html %]" />
299 <input type="hidden" id="op" name="op" value="mod_branch" />
305 [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
308 </div> <!-- /.col-sm-6 -->
310 <div class="col-sm-6">
312 [% IF ( creationdate ) %]
313 <li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>
315 [% IF ( closedate ) %]
316 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
318 [% IF ( ediaccount ) %]
319 [%- BLOCK edi_status -%]
320 [%- SWITCH edi_order.status -%]
321 [%- CASE 'Pending' -%]<span>Pending</span>
322 [%- CASE 'Sent' -%]<span>Sent</span>
323 [%- CASE 'Processed' -%]<span>Processed</span>
326 [% IF ( edi_order ) %]
327 <li><span class="label">EDI status:</span> [%- PROCESS edi_status edi_order=edi_order -%] ([% edi_order.transfer_date | $KohaDates %])</li>
329 <li><span class="label">EDI status:</span> Not ordered</li>
332 [% IF ( estimateddeliverydate ) %]
333 <li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>
335 <li><span class="label">Orders are standing:</span> [% IF is_standing %]Yes[% ELSE %]No[% END %]</li>
337 [% IF basket.create_items %]
339 <span class="label">Create items when:</span>
340 [% SWITCH basket.create_items %]
341 [% CASE 'receiving' %]<span>Receiving items</span>
342 [% CASE 'cataloguing' %]<span>Cataloguing items</span>
343 [% CASE %]<span>Placing orders</span>
349 [% IF ( closedate ) %]
352 <span class="label">Basket group:</span>
353 [% IF basketgroup.id and not basketgroup.name %]
354 [% SET basketgroup.name = "Basket group no. " _ basketgroup.id %]
357 [% IF basketgroup.closed %]
358 [% IF ( CAN_user_acquisition_group_manage ) %]
359 <a href="basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]" title="basketgroup">[% basketgroup.name | html %] <span>(closed)</span></a>
361 [% basketgroup.name | html %] <span>(closed)</span>
363 [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
364 [%- IF basketgroup.id -%]
365 [% basketgroup.name | html %]
367 <span>No group</span>
370 [% IF ( CAN_user_acquisition_group_manage ) %]
371 [% IF ( basketgroup.id ) %]
372 [% basketgroup.name | html %]
373 <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Change basket group</a>
376 <a href="#" id="set_basket_group"><i class="fa fa-pencil"></i> Set basket group</a>
381 [% IF ( CAN_user_acquisition_group_manage ) %]
382 <li id="basket_grouping" style="display:none;">
383 <span class="label"> </span>
384 <div style="float:left">
385 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
386 <select id="basketgroupid" name="basketgroupid">
387 <option value="">No group</option>
388 [% FOREACH bg IN basketgroups %]
389 [% IF ( bg.default ) %]
390 <option value="[% bg.id | html %]" selected="selected">[% bg.name | html %]</option>
392 [% UNLESS bg.closed %]
393 <option value="[% bg.id | html %]">[% bg.name | html %]</option>
395 <option value="[% bg.id | html %]" disabled="disabled">[% bg.name | html %] <span>(closed)</span></option>
399 <option value="new">Add new group</option>
401 <a href="#" id="basket_group_cancel" class="cancel">Cancel</a>
402 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
403 <input type="hidden" value="mod_basket" name="op" />
404 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
408 [% END # /IF ( CAN_user_acquisition_group_manage ) %]
409 [% IF basketgroup.deliveryplace %]
411 <span class="label">Basket group delivery placename:</span> [% Branches.GetName( basketgroup.deliveryplace ) | html %]
414 [% IF basketgroup.billingplace %]
416 <span class="label">Basket group billing place:</span> [% Branches.GetName( basketgroup.billingplace ) | html %]
420 [% END # /IF closeddate %]
421 </div> <!-- /.rows -->
422 </div> <!-- /.col-sm-6 -->
423 </div> <!-- /#acqui_basket_summary.row -->
425 [% IF ( duplinbatch ) %]<div class="dialog alert">
426 <h4>Duplicate warning</h4>
427 <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>
430 <div id="acqui_basket_content">
431 [% IF ( books_loop ) %]
437 <th>[% tp('noun', 'Order') | html %]</th>
438 <th>RRP tax exc.</th>
439 <th>Actual cost tax exc.</th>
440 <th>Budgeted cost tax exc.</th>
441 <th>RRP tax inc.</th>
442 <th>Actual cost tax inc.</th>
443 <th>Budgeted cost tax inc.</th>
444 <th>Replacement price</th>
446 <th>Total tax exc. ([% currency | html %])</th>
447 <th>Total tax inc. ([% currency | html %])</th>
451 [% IF Koha.Preference('EDIFACT') && ediaccount %]
452 <th>Supplier report</th>
454 <th>Estimated delivery date</th>
456 [% UNLESS ( closedate ) %]
457 <th class="NoSort">Modify</th>
458 <th class="NoSort">Cancel order</th>
464 [% FOREACH foot_loo IN book_foot_loop %]
467 <th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th>
475 <th>[% foot_loo.quantity | html %]</th>
476 <th>[% foot_loo.total_tax_excluded | $Price %]</th>
477 <th>[% foot_loo.total_tax_included | $Price %]</th>
479 <th>[% foot_loo.tax_value | $Price %]</th>
481 [% IF Koha.Preference('EDIFACT') && ediaccount %]
484 <th>[% foot_loo.estimated_delivery_date | $KohaDates %]</th>
486 [% UNLESS ( closedate ) %]
495 <th>Total ([% currency | html %])</th>
503 <th>[% total_quantity | html %]</th>
504 <th>[% total_tax_excluded | $Price %]</th>
505 <th>[% total_tax_included | $Price %]</th>
507 <th>[% total_tax_value | $Price %]</th>
509 [% IF Koha.Preference('EDIFACT') && ediaccount %]
512 <th>[% estimated_delivery_date | $KohaDates %]</th>
514 [% UNLESS ( closedate ) %]
522 [% FOREACH books_loo IN books_loop %]
523 [% IF ( books_loo.order_received ) %]
524 <tr class="disabled">
529 [% books_loo.ordernumber | html %]
533 [% IF ( books_loo.order_received ) %] <span class="order-received">(received)</span>[% END %]
534 [%- IF books_loo.title %]
535 <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 -%]
537 <em>Deleted bibliographic record, can't find title</em><br />
540 [%- IF ( books_loo.isbn ) %] - [% books_loo.isbn | html %][% END -%]
541 [%- IF ( books_loo.issn ) %] - [% books_loo.issn | html %][% END -%]
542 [%- IF ( books_loo.publishercode ) %], [% books_loo.publishercode | html %][% END -%]
543 [%- IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear | html -%]
544 [%- ELSIF ( books_loo.copyrightdate ) %] [% books_loo.copyrightdate | html %][% END -%]
545 [%- IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END -%]
546 [%- IF ( books_loo.suggestionid ) %]
548 Suggested by: [% books_loo.surnamesuggestedby | html %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby | html %] [% END %]
549 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid | uri %]&op=show">suggestion #[% books_loo.suggestionid | html %]</a>)
552 [% IF ( books_loo.order_internalnote ) %]
553 <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>
555 <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>
557 [% IF ( books_loo.order_vendornote ) %]
558 <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>
560 <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>
562 [% IF (books_loo.transferred_from) %]
563 [% basket = books_loo.transferred_from.basket %]
564 [% bookseller = books_loo.transferred_from.bookseller %]
565 [% timestamp = books_loo.transferred_from.timestamp %]
566 <p>Transferred from basket:
567 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
568 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>)
569 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
570 [% timestamp | $KohaDates %]
574 [% SET claims = books_loo.order_object.claims %]
575 [% IF claims.count %]
577 This order has been claimed [% claims.count | html %] times. On [% FOR c IN claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %]
581 [% 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 ... %]
582 [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
583 <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %] [% IF ( books_loo.uncertainprice ) %] <span>(Uncertain)</span> [% END %] </td>
584 <td class="number [% IF books_loo.unitprice_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.unitprice_tax_excluded | $Price %]</td>
585 <td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price %]</td>
586 <td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
587 <td class="number [% IF books_loo.unitprice_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.unitprice_tax_included | $Price %]</td>
588 <td class="number [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
589 <td class="number [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">[% books_loo.replacementprice | $Price %]</td>
590 <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | html %]</td>
591 <td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
592 <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
593 <td class="number">[% books_loo.tax_rate * 100 | html %]</td>
594 <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
595 <td>[% books_loo.budget_name | html %]</td>
596 [% IF Koha.Preference('EDIFACT') && ediaccount %]
597 <td>[% books_loo.suppliers_report | html %]</td>
600 [% books_loo.estimated_delivery_date | $KohaDates %]
601 [% IF CAN_user_acquisition_order_manage %]
602 <a class="edit_delivery_date" href="/cgi-bin/koha/acqui/moddeliverydate.pl?ordernumber=[% books_loo.ordernumber | html %]" title="Edit delivery date" data-ordernumber="[% books_loo.ordernumber | html %]">
603 <i class="fa fa-pencil"></i> Edit
608 [% UNLESS ( closedate ) %]
610 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Modify</a>
611 [% UNLESS (books_loo.order_received) %]
613 <a href="#" class="transfer_order" data-ordernumber="[% books_loo.ordernumber | html %]">Transfer</a>
617 [% IF ( books_loo.orderstatus != "complete") %]
618 [% IF ( books_loo.left_holds_on_order ) %]
619 <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>
621 <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>
623 [% IF ( books_loo.can_del_bib ) %]
624 <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>
626 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
628 [% IF ( books_loo.left_item ) %]
629 <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>
631 [% IF ( books_loo.left_biblio ) %]
632 <strong title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios | html %] order(s) left</strong><br>
634 [% IF ( books_loo.left_subscription ) %]
635 <strong title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions | html %] subscription(s) left</strong><br>
637 [% IF ( books_loo.left_holds ) %]
638 <strong title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds | html %] hold(s) left</strong>
649 [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
651 </div> <!-- /#acqui_basket_content -->
652 [% IF (cancelledorders_loop) %]
653 <div id="cancelledorders">
654 <h2>Cancelled orders</h2>
655 <table id="cancelledorderst">
659 <th>[% tp('noun', 'Order') | html %]</th>
660 <th class="tax_excluded">RRP tax exc.</th>
661 <th class="tax_excluded">ecost tax exc.</th>
662 <th class="tax_included">RRP tax inc.</th>
663 <th class="tax_included">ecost tax inc.</th>
664 <th class="replacementprice">Replacement price</th>
666 <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
667 <th class="tax_included">Total tax inc. ([% currency | html %])</th>
674 [% FOREACH order IN cancelledorders_loop %]
675 <tr style="color:grey">
677 [% order.ordernumber | html %]
681 [% IF ( order.order_received ) %] <span class="order-received">(received)</span>[% END %]
682 [% IF (order.title) %]
683 [% order.title | html %][% IF order.author %] by [% order.author | html %][% END %]
685 <em>Deleted bibliographic record, can't find title</em>
688 [% IF ( order.order_internalnote ) %] [% order.order_internalnote | html %][% END %]
689 [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
690 [% IF ( order.issn ) %] - [% order.issn | html %][% END %]
691 [% IF ( order.publishercode ) %], [% order.publishercode | html %][% END %]
692 [% IF ( order.publicationyear ) %], [% order.publicationyear | html %]
693 [% ELSIF ( order.copyrightdate ) %] [% order.copyrightdate | html %][% END %]
694 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement | html %][% END %]
695 [% IF ( order.cancellationreason ) %]
697 Cancellation reason: [% AuthorisedValues.GetByCode( 'ORDER_CANCELLATION_REASON', order.cancellationreason ) | html %]
700 [% IF order.transferred_to %]
701 [% basket = order.transferred_to.basket %]
702 [% bookseller = order.transferred_to.bookseller %]
703 [% timestamp = order.transferred_to.timestamp %]
704 <p>Transferred to basket:
705 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]"> [% basket.basketname | html %]</a>
706 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id | uri %]">[% bookseller.name | html %]</a>)
707 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
708 [% timestamp | $KohaDates %]
714 [% order.rrp_tax_excluded | $Price %]
715 [% IF ( order.uncertain ) %]
716 <span>(Uncertain)</span>
719 <td class="number">[% order.ecost_tax_excluded | $Price %]</td>
720 <td class="number">[% order.rrp_tax_included | $Price %]</td>
721 <td class="number">[% order.ecost_tax_included | $Price %]</td>
722 <td class="number">[% order.replacementprice | $Price %]</td>
723 <td class="number">[% order.quantity | html %]</td>
724 <td class="number">[% order.total_tax_excluded | $Price %]</td>
725 <td class="number">[% order.total_tax_included | $Price %]</td>
726 <td class="number">[% order.tax_rate * 100 | html %]</td>
727 <td class="number">[% order.tax_value | $Price %]</td>
728 <td>[% order.budget_name | html %]
733 </div> <!-- /#cancelledorders -->
737 [% UNLESS ( closedate ) %]
739 <div id="addtoBasket" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true" data-basketno="[% basket.basketname | html %]">
740 <div class="modal-dialog" role="document">
741 <div class="modal-content">
742 <div class="modal-header">
743 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
744 <h4 class="modal-title" id="addtoBasketLabel">Add order to basket</h4>
746 <div class="modal-body">
748 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
751 <div class="modal-footer">
752 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
754 </div><!-- /.modal-content -->
755 </div><!-- /.modal-dialog -->
756 </div><!-- /.modal -->
760 [% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
762 [% IF ( confirm_close ) %]
763 <div id="closebasket_needsconfirmation" class="dialog alert">
765 <form action="/cgi-bin/koha/acqui/basket.pl">
766 <h1>Are you sure you want to close basket [% basketname | html %]?</h1>
767 [% IF ( CAN_user_acquisition_group_manage ) %]
769 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
770 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
773 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
774 <input type="hidden" value="close" name="op" />
775 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
776 <input type="hidden" name="confirm" value="1" />
777 <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
778 <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
780 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
781 <input type="hidden" name="basketno" value="[% basketno | html %]" />
782 <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
787 <div id="closebasket_needsconfirmation" class="dialog alert">
789 <form action="/cgi-bin/koha/acqui/basket.pl">
790 <h1>Are you sure you want to generate an EDIFACT order and close basket [% basketname | html %]?</h1>
791 [% IF CAN_user_acquisition_group_manage %]
793 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
794 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
797 <input type="hidden" id="basketno" value="[% basketno | html %]" name="basketno" />
798 <input type="hidden" value="ediorder" name="op" />
799 <input type="hidden" name="ean" value="[% ean | html %]" />
800 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
801 <input type="hidden" name="confirm" value="1" />
802 <input type="hidden" name="basketgroupname" value="[% basketgroupname | html %]" />
803 <button type="submit" class="approve" accesskey="Y"><i class="fa fa-fw fa-check"></i> Yes, close (Y)</button>
805 <form action="/cgi-bin/koha/acqui/basket.pl" method="get">
806 <input type="hidden" name="basketno" value="[% basketno | html %]" />
807 <button type="submit" class="deny" accesskey="N"><i class="fa fa-fw fa-remove"></i> No, don't close (N)</button>
811 [% END %][%# IF (cannot_manage_basket) %]
814 </div> <!-- /.col-sm-10.col-sm-push-2 -->
816 <div class="col-sm-2 col-sm-pull-10">
818 [% INCLUDE 'vendor-menu.inc' %]
819 [% INCLUDE 'acquisitions-menu.inc' %]
821 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
822 </div> <!-- /.row -->
825 <!-- Modal for editing vendor and internal notes -->
826 <div class="modal" id="noteEditor" tabindex="-1" role="dialog" aria-labelledby="noteEditorLabel">
827 <div class="modal-dialog" role="document">
828 <form id="modify_order_notes" action="/cgi-bin/koha/acqui/modordernotes.pl" method="post">
829 <div class="modal-content">
830 <div class="modal-header">
831 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
832 <h4 class="modal-title" id="noteEditorLabel">Order note</h4>
834 <div class="modal-body">
835 <textarea id="ordernotes" name="ordernotes" rows="3" cols="30" class="focus">[% ordernotes | html %]</textarea>
836 <input type="hidden" id="ordernumber" name="ordernumber" value="" />
837 <input type="hidden" name="op" value="save" />
838 <input type="hidden" id="type" name="type" value="" />
840 <div class="modal-footer">
841 <button type="submit" class="btn btn-default">Save</button>
842 <button type="button" class="btn btn-link cancel" data-dismiss="modal">Cancel</button>
849 <!-- Modal for editing estimated delivery date -->
850 <div class="modal" id="dateEditor" tabindex="-1" role="dialog" aria-labelledby="dateEditorLabel">
851 <div class="modal-dialog" role="document">
852 <form id="modify_estimated_delivery_date" action="/cgi-bin/koha/acqui/moddeliverydate.pl" method="post">
853 <div class="modal-content">
854 <div class="modal-header">
855 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
856 <h4 class="modal-title" id="dateEditorLabel">Estimated delivery date</h4>
858 <div class="modal-body">
859 <input type="text" id="estimated_delivery_date" size="10" name="estimated_delivery_date" class="flatpickr" value="[% books_loo.estimated_delivery_date | $KohaDates %]"/>
860 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
861 <input type="hidden" id="date_ordernumber" name="ordernumber" value="" />
862 <input type="hidden" name="op" value="save" />
864 <div class="modal-footer">
865 <button type="submit" class="btn btn-default">Save</button>
866 <button type="button" class="btn btn-link cancel" data-dismiss="modal">Cancel</button>
873 [% MACRO jsinclude BLOCK %]
874 [% Asset.js("js/acquisitions-menu.js") | $raw %]
875 [% INCLUDE 'datatables.inc' %]
876 [% INCLUDE 'columns_settings.inc' %]
877 [% Asset.js("lib/hc-sticky.js") | $raw %]
878 [% Asset.js("js/acq.js") | $raw %]
879 [% INCLUDE 'calendar.inc' %]
881 function updateColumnsVisibility(visible) {
883 $("table .tax_excluded, .tax_included").show();
885 [% IF ( listincgst ) %]
886 $("table .tax_excluded").hide();
888 $("table .tax_included").hide();
895 $(document).ready(function() {
896 if ( $('#toolbar').length ) {
897 Sticky = $("#toolbar");
900 stickyClass: "floating"
904 [% UNLESS ( closedate ) %]
905 $('#addtoBasket').on('show', function () {
906 $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
910 $("body").on("click", ".del_user", function(e){
912 del_user( $(this).data("borrowernumber") );
915 $("#add_user").on("click",function(e){
920 $(".transfer_order").on("click",function(e){
922 transfer_order_popup( $(this).data("ordernumber"));
925 $(".edit_note").on("click", function(e) {
927 var ordernumber = $(this).data("ordernumber");
928 var note_type = $(this).data("note_type");
929 var modalTitle = $(this).attr("title") + " (order number " + ordernumber + ")";
930 var note_text = $( "#" + note_type + "-note-" + ordernumber ).html();
931 $("#noteEditor .modal-title").text(modalTitle);
932 $("#ordernumber").val( ordernumber );
933 $("#ordernotes").html( note_text );
934 $("#type").val( note_type );
935 $("#noteEditor").modal("show");
936 $("#ordernotes").focus();
939 $("#noteEditor").on('hidden.bs.modal', function (e) {
940 $("#noteEditorLabel").html("");
941 $("#noteEditor .modal-title").text("");
942 $("#ordernotes").html( "" );
943 $("#ordernumber").val("");
947 $("#set_managing_library").on("click", function(e){
950 $("#managing_library_entry").show();
953 $("#library_entry_cancel").on("click", function(e){
955 $("#managing_library_entry").hide();
956 $("#set_managing_library").show();
959 $("#set_basket_group").on("click", function(e){
962 $("#basket_grouping").show();
965 $("#basket_group_cancel").on("click", function(e){
967 $("#basket_grouping").hide();
968 $("#set_basket_group").show();
971 $("#addtoBasket").on("shown.bs.modal", function(){
972 var basket = $(this).data("basketno");
973 var legend = _("Add order to basket %s").format(basket);
974 $(this).find("h4").text( legend );
975 $(this).find("legend").html(legend);
976 $(this).find("input:text").focus();
981 [% UNLESS ( closedate ) %]
983 function transfer_order_popup(ordernumber) {
984 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
985 + "ordernumber=" + ordernumber
986 window.open(url, 'TransferOrder','width=600,height=400,toolbar=false,scrollbars=yes');
989 function confirm_ediorder() {
990 var is_confirmed = confirm(_("Are you sure you want to close this basket and generate an EDIFACT order?"));
992 window.location = "/cgi-bin/koha/acqui/basket.pl?op=edi_confirm&basketno=[% basketno | html %]";
998 $(document).ready(function(){
999 $("#basketgroupid").change(function(){
1000 if($(this).val() == "new"){
1001 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | html %]";
1003 $(this).parent().submit();
1008 [% UNLESS ( grouped ) %]
1010 function confirm_reopen() {
1011 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
1012 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
1014 window.location = "/cgi-bin/koha/acqui/basket.pl?op=reopen&basketno=[% basketno | html %]";
1021 $(document).ready(function() {
1022 var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %];
1023 [% IF !(Koha.Preference('EDIFACT') && ediaccount) %]
1024 table_settings['columns'].splice(13, 1);
1026 KohaTable("orders", {
1027 "sPaginationType": "full",
1029 "exportColumns": [0,1,2,3,4,5,6,7,8,9,10,11,12,13],
1032 var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
1033 "sPaginationType": "full"
1035 $("#reopenbutton").on("click",function(e){
1039 // Generates a dynamic link for exporting the selections data as CSV
1040 $("#exportbutton, #export-csv-menu a").click(function() {
1041 // Building the url from currently checked boxes
1042 var url = '/cgi-bin/koha/acqui/basket.pl';
1043 url += $('#exportbutton').attr('href');
1044 if($(this).attr("data-value")) {
1045 url += '&csv_profile=' + $(this).attr("data-value");
1047 // And redirecting to the CSV page
1048 location.href = url;
1051 $("#select_managing_library").on("change", function(){
1052 $(this).parent().submit();
1055 $(".edit_delivery_date").on("click", function(e) {
1057 var ordernumber = $(this).data("ordernumber");
1058 var modalTitle = $(this).attr("title") + " (order number " + ordernumber + ")";
1059 var date_text = $( "#delivery_date_" + ordernumber ).html();
1060 $("#dateEditor .modal-title").text(modalTitle);
1061 $("#date_ordernumber").val(ordernumber);
1062 $("#estimated_delivery_date").html( date_text );
1063 $("#dateEditor").modal("show");
1066 $("#dateEditor").on('hidden.bs.modal', function (e) {
1067 $("#dateEditorLabel").html("");
1068 $("#dateEditor .modal-title").text("");
1069 $("#estimated_delivery_date").html( "" );
1070 $("#date_ordernumber").val("");
1074 function UserSearchPopup(f) {
1076 "/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,action&selection_type=add&filter=baskets_managers",
1078 'width=1024, height=768, scrollbars=yes, toolbar=no,'
1082 function add_user(borrowernumber, borrowername) {
1083 var ids = $("#users_ids").val();
1084 if(ids.length > 0) {
1085 ids = ids.split(':');
1089 if (ids.indexOf(borrowernumber.toString()) < 0) {
1090 ids.push(borrowernumber);
1091 $("#users_ids").val(ids.join(':'));
1092 var li = '<li id="user_'+borrowernumber+'">'+borrowername
1093 + ' <a href="#" data-borrowernumber="'+borrowernumber+'" class="del_user"><i class="fa fa-trash"></i> '
1094 + _("Delete user") + '</a></li>';
1095 $("#users_names").prepend(li);
1096 $("#add_user_submit").show();
1102 function del_user(borrowernumber) {
1103 $("#user_"+borrowernumber).remove();
1104 var ids = $("#users_ids").val().split(':');
1105 ids.splice(ids.indexOf(borrowernumber.toString()), 1);
1106 $("#users_ids").val(ids.join(':'));
1107 $("#add_user_submit").show();
1112 [% INCLUDE 'intranet-bottom.inc' %]