2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript">
9 function updateColumnsVisibility(visible) {
11 $("table .gste, .gsti").show();
13 [% IF ( listincgst ) %]
14 $("table .gste").hide();
16 $("table .gsti").hide();
21 $(document).ready(function() {
22 $("#show_all_details").click(function(){
23 updateColumnsVisibility($(this+":checked").val());
26 $("#show_all_details").attr('checked', false);
27 updateColumnsVisibility(false);
28 [% UNLESS ( closedate ) %]
29 $('#addtoBasket').on('show', function () {
30 $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
37 [% UNLESS ( closedate ) %]
38 <script type="text/javascript">
40 function confirm_close() {
41 var is_confirmed = confirm(_("Are you sure you want to close this basket?"));
43 window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
46 function confirm_deletion() {
47 var is_confirmed = confirm(_("Are you sure you want to delete this basket?"));
49 window.location = "[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]";
52 function confirm_delete_item(ordernumber, biblionumber) {
53 var is_confirmed = confirm(_("Are you sure you want to delete this order ?"));
55 window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
59 function confirm_delete_biblio(ordernumber, biblionumber) {
60 var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?"));
62 window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
66 function transfer_order_popup(ordernumber) {
67 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
68 + "ordernumber=" + ordernumber
69 window.open(url, 'TransferOrder');
75 <script type="text/javascript">
77 $(document).ready(function(){
78 $("#basketgroupid").change(function(){
79 if($(this).val() == "new"){
80 location.href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]";
86 [% UNLESS ( grouped ) %]
87 <script type="text/javascript">
89 function confirm_reopen() {
90 var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
91 var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
93 window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
100 <script type="text/javascript">
102 $(document).ready(function() {
103 var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
104 "sPaginationType": "four_button",
106 [% UNLESS ( closedate ) %]
108 { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
113 var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
114 "sPaginationType": "four_button"
116 $("#delbasketbutton").on("click",function(e){
120 $("#reopenbutton").on("click",function(e){
128 <style type="text/css">
129 .sortmsg {font-size: 80%;}
132 <body id="acq_basket" class="acq">
133 [% INCLUDE 'header.inc' %]
134 [% INCLUDE 'acquisitions-search.inc' %]
137 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a> › [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div>
139 <div id="doc3" class="yui-t2">
144 [% UNLESS ( confirm_close ) %]
145 [% UNLESS ( selectbasketg ) %]
146 [% UNLESS ( closedate ) %]
147 <div id="toolbar" class="btn-toolbar">
148 <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-plus"></i> Add to basket</a></div>
149 <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div>
150 <div class="btn-group"><a href="#" class="btn btn-small" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div>
151 [% IF ( unclosable ) %]
152 [% ELSIF ( uncertainprices ) %]
153 <div class="btn-group"><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="btn btn-small" id="uncertpricesbutton">Uncertain prices</a></div>
155 <div class="btn-group">
156 <a href="[% script_name %]?op=close&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="closebutton"><i class="icon-remove-sign"></i> Close this basket</a>
159 <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
163 [% UNLESS ( grouped ) %]
164 <div id="toolbar" class="btn-toolbar">
165 <div class="btn-group"><a href="#" class="btn btn-small" id="reopenbutton"><i class="icon-refresh"></i> Reopen this basket</a></div>
166 <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
172 [% IF ( NO_BOOKSELLER ) %]
173 <h2>Vendor not found</h2>
175 [% IF ( delete_confirmed ) %]
176 <h3>Basket deleted</h3>
177 <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl">
179 <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1>
180 [% IF ( delete_confirm ) %]
182 <span class="yui-button yui-link-button">
183 <em class="first-child">
184 <a href="[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a>
187 <span class="yui-button yui-link-button">
188 <em class="first-child">
189 <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a>
194 [% IF ( basketno ) %]
195 <div id="acqui_basket_summary" class="yui-g">
197 <div class="yui-u first">
199 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
200 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
201 [% IF ( basketcontractno ) %]
202 <li><span class="label">Contract name:</span> <a href="../admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]&booksellerid=[% booksellerid %]">[% basketcontractname %]</a></li>
204 [% IF ( deliveryplace ) %]<li><span class="label">Delivery place:</span> [% deliveryplace %]</li>[% END %]
205 [% IF ( billingplace ) %]<li><span class="label">Billing place:</span> [% billingplace %]</li>[% END %]
206 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname %]</li>[% END %]
207 [% IF ( creationdate ) %]<li><span class="label">Opened on:</span> [% creationdate | $KohaDates %]</li>[% END %]
208 [% IF ( closedate ) %]<li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>[% END %]
209 [% IF ( estimateddeliverydate ) %]<li><span class="label">Estimated delivery date:</span> [% estimateddeliverydate | $KohaDates %]</li>[% END %]
213 [% IF ( closedate ) %]
215 [% IF ( CAN_user_acquisition_group_manage ) %]
216 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
220 <span class="label">Basket group:</span>
221 [% IF basketgroup.closed %]
222 [% basketgroup.name %] (closed)
223 [% ELSIF ( ! CAN_user_acquisition_group_manage ) %]
224 [%- IF basketgroup.name -%]
225 [% basketgroup.name %]
230 <select id="basketgroupid" name="basketgroupid">
231 <option value="new">Add new group</option>
232 [% FOREACH bg IN basketgroups %]
233 [% IF ( bg.default ) %]
234 <option value="[% bg.id %]" selected="selected">[% bg.name %]</option>
236 [% UNLESS bg.closed %]
237 <option value="[% bg.id %]">[% bg.name %]</option>
239 <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option>
244 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
245 <input type="hidden" value="mod_basket" name="op" />
246 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
247 <input type="submit" value="Change basket group" />
250 [% IF ( basketgroup.deliveryplacename ) %]<li><span class="label">Basket group delivery placename:</span> [% basketgroup.deliveryplacename %]</li>[% END %]
251 [% IF ( basketgroup.billingplacename ) %]<li><span class="label">Basket group billing place:</span> [% basketgroup.billingplacename %]</li>[% END %]
253 [% IF ( CAN_user_acquisition_group_manage ) %]
262 [% UNLESS ( delete_confirm ) %]
263 <div id="acqui_basket_content" class="yui-g">
264 [% IF ( books_loop ) %]
266 <label for="show_all_details">
267 <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
274 <th class="gste">RRP tax exc.</th>
275 <th class="gste">ecost tax exc.</th>
276 <th class="gsti">RRP tax inc.</th>
277 <th class="gsti">ecost tax inc.</th>
279 <th class="gste">Total tax exc. ([% currency %])</th>
280 <th class="gsti">Total tax inc. ([% currency %])</th>
285 [% UNLESS ( closedate ) %]
293 [% FOREACH foot_loo IN book_foot_loop %]
295 <th>Total (GST [% foot_loo.gstgsti %])</th>
296 <th class="gste"> </th>
297 <th class="gste"> </th>
298 <th class="gsti"> </th>
299 <th class="gsti"> </th>
300 <th>[% foot_loo.quantity %]</th>
301 <th class="gste">[% foot_loo.totalgste %]</th>
302 <th class="gsti">[% foot_loo.totalgsti %]</th>
304 <th>[% foot_loo.gstvalue %]</th>
307 [% UNLESS ( closedate ) %]
315 <th>Total ([% currency %])</th>
316 <th class="gste"> </th>
317 <th class="gste"> </th>
318 <th class="gsti"> </th>
319 <th class="gsti"> </th>
320 <th>[% total_quantity %]</th>
321 <th class="gste">[% total_gste %]</th>
322 <th class="gsti">[% total_gsti %]</th>
324 <th>[% total_gstvalue %]</th>
327 [% UNLESS ( closedate ) %]
335 [% FOREACH books_loo IN books_loop %]
336 [% IF ( books_loo.order_received ) %]<tr class="disabled">[% ELSE %][% IF ( books_loo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %][% END %]
338 <p>[% IF ( books_loo.order_received ) %] (rcvd)[% END %]
339 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% books_loo.biblionumber %]">[% books_loo.title |html %]</a> by [% books_loo.author %]
341 [% IF ( books_loo.isbn ) %] - [% books_loo.isbn %][% END %]
342 [% IF ( books_loo.issn ) %] - [% books_loo.issn %][% END %]
343 [% IF ( books_loo.publishercode ) %], [% books_loo.publishercode %][% END %]
344 [% IF ( books_loo.publicationyear ) %], [% books_loo.publicationyear %][% END %]
345 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
346 [% IF ( books_loo.suggestionid ) %]
348 Suggested by: [% books_loo.surnamesuggestedby %][% IF ( books_loo.firstnamesuggestedby ) %], [% books_loo.firstnamesuggestedby %] [% END %]
349 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% books_loo.suggestionid %]&op=show">suggestion #[% books_loo.suggestionid %]</a>)
352 [% IF ( books_loo.notes ) %]
353 <p class="ordernote"><strong>Note: </strong>[% books_loo.notes|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Change note</a>]</p>
355 <p>[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>]</p>
357 [% IF (books_loo.transferred_from) %]
358 [% basket = books_loo.transferred_from.basket %]
359 [% bookseller = books_loo.transferred_from.bookseller %]
360 [% timestamp = books_loo.transferred_from.timestamp %]
362 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">basket: [% basket.basketname %]</a>
363 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
364 on <span title="[% timestamp | $KohaDates with_hours = 1 %]">
365 [% timestamp | $KohaDates %]
370 <td class="number gste [% IF books_loo.rrpgste.search('^0') %]error[% END %]">[% books_loo.rrpgste %]</td>
371 <td class="number gste [% IF books_loo.ecostgste.search('^0') %]error[% END %]">[% books_loo.ecostgste %]</td>
372 <td class="number gsti [% IF books_loo.rrpgsti.search('^0') %]error[% END %]">[% books_loo.rrpgsti %]</td>
373 <td class="number gsti [% IF books_loo.ecostgsti.search('^0') %]error[% END %]">[% books_loo.ecostgsti %]</td>
374 <td class="number [% IF books_loo.quantity.search('^0') %]error[% END %]">[% books_loo.quantity %]</td>
375 <td class="number gste [% IF books_loo.totalgste.search('^0') %]error[% END %]">[% books_loo.totalgste %]</td>
376 <td class="number gsti [% IF books_loo.totalgsti.search('^0') %]error[% END %]">[% books_loo.totalgsti %]</td>
377 <td class="number [% IF books_loo.gstgsti.search('^0') %]error[% END %]">[% books_loo.gstgsti %]</td>
378 <td class="number [% IF books_loo.gstvalue.search('^0') %]error[% END %]">[% books_loo.gstvalue %]</td>
379 <td>[% books_loo.budget_name %]</td>
381 [% UNLESS ( closedate ) %]
383 <a href="neworderempty.pl?ordernumber=[% books_loo.ordernumber %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Modify</a>
384 [% UNLESS (books_loo.order_received) %]
386 <a href="#" onclick="transfer_order_popup([% books_loo.ordernumber %]); return false;">Transfer</a>
390 [% IF ( books_loo.left_holds_on_order ) %]
391 <span class="button" title="Can't delete order, ([% books_loo.holds_on_order %]) holds are linked with this order cancel holds first">Can't delete order</span><br>
393 <a href="javascript:confirm_delete_item([% books_loo.ordernumber %],[% books_loo.biblionumber %])" class="button">Delete order</a><br>
395 [% IF ( books_loo.can_del_bib ) %]
396 <a href="javascript:confirm_delete_biblio([% books_loo.ordernumber %],[% books_loo.biblionumber %])" class="button">Delete order and catalog record</a><br>
398 <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
400 [% IF ( books_loo.left_item ) %]
401 <b title="Can't delete catalog record, because of [% books_loo.items %] existing hold(s)" >[% books_loo.items %] item(s) left</b><br>
403 [% IF ( books_loo.left_biblio ) %]
404 <b title="Can't delete catalog record, delete other orders linked to it first">[% books_loo.biblios %] order(s) left</b><br>
406 [% IF ( books_loo.left_subscription ) %]
407 <b title="Can't delete catalog record, delete subscriptions first">[% books_loo.subscriptions %] subscription(s) left</b><br>
409 [% IF ( books_loo.left_holds ) %]
410 <b title="Can't delete catalog record or order, cancel holds first">[% books_loo.holds %] hold(s) left</b>
420 [% IF ( listincgst ) %]<small class="highlight">** Vendor's listings already include tax.</small>
423 [% IF (cancelledorders_loop) %]
424 <div id="cancelledorders">
425 <h2>Cancelled orders</h2>
426 <table id="cancelledorderst">
430 <th class="gste">RRP tax exc.</th>
431 <th class="gste">ecost tax exc.</th>
432 <th class="gsti">RRP tax inc.</th>
433 <th class="gsti">ecost tax inc.</th>
435 <th class="gste">Total tax exc. ([% currency %])</th>
436 <th class="gsti">Total tax inc. ([% currency %])</th>
443 [% FOREACH order IN cancelledorders_loop %]
444 <tr style="color:grey">
447 [% IF ( order.order_received ) %] (rcvd)[% END %]
448 [% IF (order.title) %]
449 [% order.title |html %] by [% order.author %]<br />
451 <em>Deleted bibliographic record, can't find title</em><br />
453 [% IF ( order.notes ) %] [% order.notes %][% END %]
454 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
455 [% IF ( order.issn ) %] - [% order.issn %][% END %]
456 [% IF ( order.publishercode ) %], [% order.publishercode %][% END %]
457 [% IF ( order.publicationyear ) %], [% order.publicationyear %][% END %]
458 [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
460 [% IF order.transferred_to %]
461 [% basket = order.transferred_to.basket %]
462 [% bookseller = order.transferred_to.bookseller %]
463 [% timestamp = order.transferred_to.timestamp %]
465 <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">basket: [% basket.basketname %]</a>
466 (<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% bookseller.id %]">[% bookseller.name %]</a>)
467 on <span title="[% timestamp | $KohaDates with_hours = 1%]">
468 [% timestamp | $KohaDates %]
473 <td class="number gste">[% order.rrpgste %]</td>
474 <td class="number gste">[% order.ecostgste %]</td>
475 <td class="number gsti">[% order.rrpgsti %]</td>
476 <td class="number gsti">[% order.ecostgsti %]</td>
477 <td class="number">[% order.quantity %]</td>
478 <td class="number gste">[% order.totalgste %]</td>
479 <td class="number gsti">[% order.totalgsti %]</td>
480 <td class="number">[% order.gstgsti %]</td>
481 <td class="number">[% order.gstvalue %]</td>
482 <td>[% order.budget_name %]
490 [% UNLESS ( closedate ) %]
493 <div id="addtoBasket" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel" aria-hidden="true">
494 <div class="modal-body"></div>
495 <div class="modal-footer">
496 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
500 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
504 [% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket -->
506 [% IF ( confirm_close ) %]
507 <div id="closebasket_needsconfirmation" class="dialog alert">
509 <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
510 <h1>Are you sure you want to close basket [% basketname|html %]?</h1>
511 [% IF ( CAN_user_acquisition_group_manage ) %]
513 <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
514 <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
517 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
518 <input type="hidden" value="close" name="op" />
519 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
520 <input type="hidden" name="confirm" value="1" />
521 <input type="hidden" name="basketgroupname" value="[% basketgroupname %]" />
522 <input type="submit" class="approve" value="Yes, close (Y)" accesskey="y" />
523 <input type="submit" class="deny" value="No, don't close (N)" accesskey="n" onclick="javascript:window.location='/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]';return false;" />
530 [% INCLUDE 'acquisitions-menu.inc' %]
533 [% INCLUDE 'intranet-bottom.inc' %]