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>]
166 <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% loop_order.ordernumber %]" class="previewData">Order</a><br>
167 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" class="previewData">MARC</a><br>
168 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber %]" class="previewData">Card</a>
170 <td>[% loop_order.quantity %]</td>
171 <td>[% loop_order.ecost | $Price %]</td>
172 <td>[% loop_order.total | $Price %]</td>
173 <td>[% loop_order.budget_name %]</td>
175 <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber %]&invoiceid=[% invoiceid %]">Receive</a>
177 <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber %]); return false;">Transfer</a>
180 [% IF ( loop_order.left_holds_on_order ) %]
181 <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>
183 <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 />
185 [% IF ( loop_order.can_del_bib ) %]
186 <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 />
188 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
190 [% IF ( loop_order.left_item ) %]
191 <b title="Can't delete catalog record, because of [% loop_order.items %] existing item(s)" >[% loop_order.items %] item(s) left</b><br>
193 [% IF ( loop_order.left_biblio ) %]
194 <b title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios %] order(s) left</b><br>
196 [% IF ( loop_order.left_subscription ) %]
197 <b title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions %] subscription(s) left</b><br>
199 [% IF ( loop_order.left_holds ) %]
200 <b title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds %] hold(s) left</b>
207 [% ELSE %]There are no pending orders.[% END %]
211 Invoice is closed, so you can't receive orders anymore.
212 <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Reopen it</a>.
216 <div id="acqui_receive_receivelist">
217 <h3>Already received</h3>
219 [% IF ( loop_received ) %]
220 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
221 <table id="receivedt">
225 <th>Basket group</th>
227 <th title="Item holds / Total holds">Holds</th>
239 [% FOREACH key IN subtotal_for_funds.keys.sort %]
241 [% IF invoiceincgst %]
242 <td colspan="6" class="total">(Tax inc.)</td>
244 <td colspan="6" class="total">(Tax exc.)</td>
246 <td colspan="2"><i>Subtotal for</i> [% key %]</td>
247 <td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
248 <td>[% subtotal_for_funds.$key.unitprice | $Price %]</td>
254 <th colspan="10" class="total">Total tax exc.</th>
255 <th>[% total_tax_excluded | $Price %]</th>
258 [% FOREACH book_foot IN book_foot_loop %]
260 <th colspan="10">Total (GST [% book_foot.tax_rate * 100 %]%)</th>
261 <th>[% book_foot.tax_value | $Price %]</th>
266 <th colspan="10" class="total">Total tax inc.</th>
267 <th>[% total_tax_included | $Price %]</th>
271 <tbody class="filterclass">
272 [% FOREACH order IN loop_received %]
274 <td>[% order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
276 [% IF order.basketgroupid %]
277 [% order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% order.booksellerid %]">[% order.basketgroupid %]</a>)
283 <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% booksellerid %]">[% order.ordernumber %]</a>
284 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
285 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber %]&booksellerid=[% booksellerid %]" title="Original order line">[% order.parent_ordernumber %]</a>)
289 [% IF order.total_holds > 0 %]
290 [% IF order.item_holds > 0 %]
291 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.item_holds %]</a></span>
296 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.total_holds %]</a></span>
301 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
302 [% IF ( order.author ) %] / [% order.author %][% END %]
303 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
304 [% IF ( order.publishercode ) %]
305 <br />Publisher: [% order.publishercode %]
306 [%- IF ( order.publicationyear > 0) -%], [% order.publicationyear %]
307 [%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate %]
310 [% IF ( order.suggestionid ) %]
312 Suggested by: [% order.surnamesuggestedby %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby %] [% END %]
313 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid %]&op=show">suggestion #[% order.suggestionid %]</a>)
316 <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>
317 <td>[% order.quantityreceived %]</td>
318 <td>[% order.budget.budget_name %]</td>
319 <td>[% order.ecost | $Price %]</td>
320 <td>[% order.unitprice | $Price %]</td>
321 <td>[% order.total | $Price %]</td>
323 [% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
324 [% IF loop_receive.cannot_cancel %]
325 [% span_title = BLOCK %]
326 Cannot cancel receipt of this order line because it
327 was created from a partial receipt of order line no.
328 [% order.parent_ordernumber %], which is
329 already received. Try cancelling this one first and
333 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
334 [%# Some additional checks should be added in the pl file %]
335 [% span_title = BLOCK %]
336 Cannot cancel receipt of this order line because at least one reservation exists on the records.
339 <span title="[% span_title | collapse %]">
343 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&op=cancelreceipt&ordernumber=[% order.ordernumber %]">Cancel receipt</a>
352 [% ELSE %]There are no received orders.[% END %]
355 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
356 <div class="modal-dialog">
357 <div class="modal-content">
358 <div class="modal-header">
359 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
360 <h3 id="dataPreviewLabel">MARC preview</h3>
362 <div class="modal-body">
363 <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
365 <div class="modal-footer">
366 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
372 [% IF (invoiceclosedate) %]
373 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
375 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
376 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
377 <fieldset class="action">
378 <input type="submit" value="Finish receiving" />
390 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
391 <fieldset class="brief">
395 <label for="summaryfilter">ISBN, author or title :</label>
396 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter %]"/>
399 <label for="basketfilter">Basket :</label>
400 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter %]"/>
403 <label for="basketgroupnamefilter">Basket group name :</label>
404 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter %]" />
407 <label for="orderfilter">Order line :</label>
408 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter %]"/>
412 <label for="eanfilter">EAN :</label>
413 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter %]"/>
417 <fieldset class="action">
418 <input type="hidden" value="search" name="op" />
419 <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
420 <input type="submit" value="Filter" />
421 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
425 [% INCLUDE 'acquisitions-menu.inc' %]
429 [% MACRO jsinclude BLOCK %]
430 [% Asset.js("js/acquisitions-menu.js") %]
431 [% INCLUDE 'datatables.inc' %]
432 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") %]
433 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
434 <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
435 <script type="text/javascript">
437 dt_overwrite_html_sorting_localeCompare();
438 var sticky_filters = [% sticky_filters %];
440 $(document).ready(function(){
441 if ( $("#pendingt").length ) {
442 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
444 "iCookieDuration": 60*60*24*1000, // 1000 days
445 "iDisplayLength": 10,
446 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
448 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
453 { "sType": "num-html" },
454 { "sType": "anti-the" },
464 "sPaginationType": "four_button"
467 sPlaceHolder: "head:after",
484 if ( $("#receivedt").length ) {
485 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
487 "iCookieDuration": 60*60*24*1000, // 1000 days
488 "iDisplayLength": 10,
489 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
491 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
497 { "sType": "num-html" },
498 { "sType": "anti-the" },
507 "sPaginationType": "four_button"
511 // Keep filters from finishreceive.pl to parcel.pl
512 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
513 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
514 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
515 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
516 $.cookie("filter_parcel_ean", $("#eanfilter").val());
518 $("#filterform").on('submit', function(){
519 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
520 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
521 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
522 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
523 $.cookie("filter_parcel_ean", $("#eanfilter").val());
526 $(".previewData").on("click", function(e){
528 var ltitle = $(this).text();
529 var page = $(this).attr("href");
530 $("#dataPreviewLabel").text(ltitle);
531 $("#dataPreview .modal-body").load(page + " div");
532 $('#dataPreview').modal({show:true});
534 $("#dataPreview").on("hidden", function(){
535 $("#dataPreviewLabel").html("");
536 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
541 // Case-insensitive version of jquery's contains function
542 jQuery.extend(jQuery.expr[':'], {
543 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
546 // Contains exactly function
547 jQuery.extend(jQuery.expr[':'], {
548 containsExactly: "$(a).text() == m[3]"
551 function transfer_order_popup(ordernumber) {
552 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
553 + "ordernumber=" + ordernumber
554 window.open(url, 'TransferOrder');
559 [% INCLUDE 'intranet-bottom.inc' %]