5 [% USE currency = format('%.2f') -%]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Acquisitions › [% IF ( date ) %]
9 Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name %][% END %]</title>
10 [% Asset.css("css/datatables.css") %]
11 [% INCLUDE 'doc-head-close.inc' %]
14 <body id="acq_parcel" class="acq">
15 [% INCLUDE 'header.inc' %]
16 [% INCLUDE 'acquisitions-search.inc' %]
18 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
20 Receipt summary for <i>[% name %]</i>
22 <i>[ [% invoice |html %] ]</i>
24 on <i>[% datereceived | $KohaDates %]</i>
26 Receive orders from [% name %]
30 <div id="doc3" class="yui-t2">
35 [% IF ( receive_error ) %]
36 <div class="dialog alert">
37 <h3>Error adding items:</h3>
39 [% FOREACH error_loo IN error_loop %]
40 <li>[% error_loo.error_param %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate Barcode[% END %] <!-- todo: other error conditions come here. --></li>
47 Receipt summary for <i>[% name %]</i> [% IF ( invoice ) %] <i> [ [% invoice |html %] ] </i>[% END %] on <i>[% datereceived | $KohaDates %]</i>
49 Receive orders from [% name %]
53 [% IF ( success_delorder ) %]
54 <div class="dialog message">The order has been successfully canceled.</div>
56 [% IF ( error_delitem ) %]
57 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
59 [% IF ( error_delbiblio ) %]
60 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
64 [% IF (error_cancelling_receipt) %]
65 <div class="dialog error">
66 Cannot cancel receipt. Possible reasons :
69 The order line you trying to cancel was created from a partial receipt
70 of another order line which is already received. Try to cancel this
74 The order line you trying to cancel was created from a partial receipt
75 of another order line which has been deleted. Cancellation is not
82 [% IF error_invoice_not_known %]
83 <div class="dialog error">
84 The invoice referenced by this invoiceid does not exist.
88 [% UNLESS no_orders_to_display %]
89 <div id="acqui_receive_summary">
90 <p><strong>Invoice number:</strong> [% invoice |html %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% datereceived | $KohaDates %]</p>
92 [% UNLESS (invoiceclosedate) %]
93 <div id="acqui_receive_search">
94 <h3>Pending orders</h3>
96 [% IF ( loop_orders ) %]
100 <th>Basket search</th>
101 <th>Basket group search</th>
102 <th>Order line search</th>
103 <th>Summary search</th>
105 <th>Quantity search</th>
106 <th>Unit cost search</th>
107 <th>Order cost search</th>
114 <th>Basket group</th>
126 <tbody class="filterclass">
127 [% FOREACH loop_order IN loop_orders %]
129 <td class="basketfilterclass">[% loop_order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loop_order.basketno %]">[% loop_order.basketno %]</a>)</td>
131 [% IF loop_order.basketgroupid %]
132 [% loop_order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% loop_order.booksellerid %]">[% loop_order.basketgroupid %]</a>)
137 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=[% loop_order.ordernumber %]&booksellerid=[% loop_order.booksellerid %]">[% loop_order.ordernumber %]</a></td>
138 <td class="summaryfilterclass">
139 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber %]">[% loop_order.title |html %]</a>
140 [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
141 [% IF ( loop_order.isbn ) %] – [% loop_order.isbn %][% END %]
142 [% IF ( loop_order.publishercode ) %]
143 <br />Publisher: [% loop_order.publishercode %]
144 [%- IF ( loop_order.publicationyear > 0) -%], [% loop_order.publicationyear %]
145 [%- ELSIF ( loop_order.copyrightdate > 0) -%] [% loop_order.copyrightdate %]
148 [% IF ( loop_order.suggestionid ) %]
150 Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
151 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&op=show">suggestion #[% loop_order.suggestionid %]</a>)
154 [% IF ( loop_order.order_internalnote ) %]
155 <p class="ordernote"><strong>Internal note: </strong>[% loop_order.order_internalnote|html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]&type=internal">Change internal note</a>]</p>
157 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]&type=internal">Add internal note</a>]
159 [% IF ( loop_order.order_vendornote ) %]
160 <p class="ordernote"><strong>Vendor note: </strong>[% loop_order.order_vendornote|html %]</p>
162 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]&type=vendor">Add vendor note</a>]
165 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber %]" class="previewData">Card</a></td>
166 <td>[% loop_order.quantity %]</td>
167 <td>[% loop_order.ecost | $Price %]</td>
168 <td>[% loop_order.total | $Price %]</td>
169 <td>[% loop_order.budget_name %]</td>
171 <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber %]&invoiceid=[% invoiceid %]">Receive</a>
173 <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber %]); return false;">Transfer</a>
176 [% IF ( loop_order.left_holds_on_order ) %]
177 <span class="button" title="Can't cancel order, ([% loop_order.holds_on_order %]) holds are linked with this order cancel holds first">Can't cancel order</span><br>
179 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber %]&biblionumber=[% loop_order.biblionumber %]&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order</a><br />
181 [% IF ( loop_order.can_del_bib ) %]
182 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber %]&biblionumber=[% loop_order.biblionumber %]&del_biblio=1&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order and catalog record</a><br />
184 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
186 [% IF ( loop_order.left_item ) %]
187 <b title="Can't delete catalog record, because of [% loop_order.items %] existing item(s)" >[% loop_order.items %] item(s) left</b><br>
189 [% IF ( loop_order.left_biblio ) %]
190 <b title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios %] order(s) left</b><br>
192 [% IF ( loop_order.left_subscription ) %]
193 <b title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions %] subscription(s) left</b><br>
195 [% IF ( loop_order.left_holds ) %]
196 <b title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds %] hold(s) left</b>
203 [% ELSE %]There are no pending orders.[% END %]
207 Invoice is closed, so you can't receive orders anymore.
208 <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Reopen it</a>.
212 <div id="acqui_receive_receivelist">
213 <h3>Already received</h3>
215 [% IF ( loop_received ) %]
216 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
217 <table id="receivedt">
221 <th>Basket group</th>
223 <th title="Item holds / Total holds">Holds</th>
235 [% FOREACH key IN subtotal_for_funds.keys.sort %]
237 [% IF invoiceincgst %]
238 <td colspan="6" class="total">(Tax inc.)</td>
240 <td colspan="6" class="total">(Tax exc.)</td>
242 <td colspan="2"><i>Subtotal for</i> [% key %]</td>
243 <td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
244 <td>[% subtotal_for_funds.$key.unitprice | $Price %]</td>
250 <th colspan="10" class="total">Total tax exc.</th>
251 <th>[% total_tax_excluded | $Price %]</th>
254 [% FOREACH book_foot IN book_foot_loop %]
256 <th colspan="10">Total (GST [% book_foot.tax_rate * 100 %]%)</th>
257 <th>[% book_foot.tax_value | $Price %]</th>
262 <th colspan="10" class="total">Total tax inc.</th>
263 <th>[% total_tax_included | $Price %]</th>
267 <tbody class="filterclass">
268 [% FOREACH order IN loop_received %]
270 <td>[% order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
272 [% IF order.basketgroupid %]
273 [% order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% order.booksellerid %]">[% order.basketgroupid %]</a>)
279 <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% booksellerid %]">[% order.ordernumber %]</a>
280 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
281 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber %]&booksellerid=[% booksellerid %]" title="Original order line">[% order.parent_ordernumber %]</a>)
285 [% IF order.total_holds > 0 %]
286 [% IF order.item_holds > 0 %]
287 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.item_holds %]</a></span>
292 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.total_holds %]</a></span>
297 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
298 [% IF ( order.author ) %] / [% order.author %][% END %]
299 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
300 [% IF ( order.publishercode ) %]
301 <br />Publisher: [% order.publishercode %]
302 [%- IF ( order.publicationyear > 0) -%], [% order.publicationyear %]
303 [%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate %]
306 [% IF ( order.suggestionid ) %]
308 Suggested by: [% order.surnamesuggestedby %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby %] [% END %]
309 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid %]&op=show">suggestion #[% order.suggestionid %]</a>)
312 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber %]" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber %]" class="previewData">Card</a></td>
313 <td>[% order.quantityreceived %]</td>
314 <td>[% order.budget.budget_name %]</td>
315 <td>[% order.ecost | $Price %]</td>
316 <td>[% order.unitprice | $Price %]</td>
317 <td>[% order.total | $Price %]</td>
319 [% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
320 [% IF loop_receive.cannot_cancel %]
321 [% span_title = BLOCK %]
322 Cannot cancel receipt of this order line because it
323 was created from a partial receipt of order line no.
324 [% order.parent_ordernumber %], which is
325 already received. Try cancelling this one first and
329 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
330 [%# Some additional checks should be added in the pl file %]
331 [% span_title = BLOCK %]
332 Cannot cancel receipt of this order line because at least one reservation exists on the records.
335 <span title="[% span_title | collapse %]">
339 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&op=cancelreceipt&ordernumber=[% order.ordernumber %]">Cancel receipt</a>
348 [% ELSE %]There are no received orders.[% END %]
351 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
352 <div class="modal-dialog">
353 <div class="modal-content">
354 <div class="modal-header">
355 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
356 <h3 id="dataPreviewLabel">MARC preview</h3>
358 <div class="modal-body">
359 <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
361 <div class="modal-footer">
362 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
368 [% IF (invoiceclosedate) %]
369 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
371 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
372 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
373 <fieldset class="action">
374 <input type="submit" value="Finish receiving" />
386 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
387 <fieldset class="brief">
391 <label for="summaryfilter">ISBN, author or title :</label>
392 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter %]"/>
395 <label for="basketfilter">Basket :</label>
396 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter %]"/>
399 <label for="basketgroupnamefilter">Basket group name :</label>
400 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter %]" />
403 <label for="orderfilter">Order line :</label>
404 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter %]"/>
408 <label for="eanfilter">EAN :</label>
409 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter %]"/>
413 <fieldset class="action">
414 <input type="hidden" value="search" name="op" />
415 <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
416 <input type="submit" value="Filter" />
417 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
421 [% INCLUDE 'acquisitions-menu.inc' %]
425 [% MACRO jsinclude BLOCK %]
426 [% Asset.js("js/acquisitions-menu.js") %]
427 [% INCLUDE 'datatables.inc' %]
428 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
429 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
430 <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
431 <script type="text/javascript">
433 dt_overwrite_html_sorting_localeCompare();
434 var sticky_filters = [% sticky_filters %];
436 $(document).ready(function(){
437 if ( $("#pendingt").length ) {
438 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
440 "iCookieDuration": 60*60*24*1000, // 1000 days
441 "iDisplayLength": 10,
442 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
444 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
449 { "sType": "num-html" },
450 { "sType": "anti-the" },
460 "sPaginationType": "four_button"
463 sPlaceHolder: "head:after",
480 if ( $("#receivedt").length ) {
481 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
483 "iCookieDuration": 60*60*24*1000, // 1000 days
484 "iDisplayLength": 10,
485 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
487 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
493 { "sType": "num-html" },
494 { "sType": "anti-the" },
503 "sPaginationType": "four_button"
507 // Keep filters from finishreceive.pl to parcel.pl
508 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
509 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
510 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
511 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
512 $.cookie("filter_parcel_ean", $("#eanfilter").val());
514 $("#filterform").on('submit', function(){
515 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
516 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
517 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
518 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
519 $.cookie("filter_parcel_ean", $("#eanfilter").val());
522 $(".previewData").on("click", function(e){
524 var ltitle = $(this).text();
525 var page = $(this).attr("href");
526 $("#dataPreviewLabel").text(ltitle);
527 $("#dataPreview .modal-body").load(page + " div");
528 $('#dataPreview').modal({show:true});
530 $("#dataPreview").on("hidden", function(){
531 $("#dataPreviewLabel").html("");
532 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
537 // Case-insensitive version of jquery's contains function
538 jQuery.extend(jQuery.expr[':'], {
539 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
542 // Contains exactly function
543 jQuery.extend(jQuery.expr[':'], {
544 containsExactly: "$(a).text() == m[3]"
547 function transfer_order_popup(ordernumber) {
548 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
549 + "ordernumber=" + ordernumber
550 window.open(url, 'TransferOrder');
555 [% INCLUDE 'intranet-bottom.inc' %]