6 [% USE currency = format('%.2f') -%]
7 [% PROCESS 'i18n.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
11 Koha › Acquisitions ›
12 [% IF ( invoiceclosedate ) %]
13 Receipt summary for [% name | html %] [% IF ( invoice ) %]invoice [% invoice | html %][% END %]
15 Receive orders from [% name | html %]
18 [% INCLUDE 'doc-head-close.inc' %]
21 <body id="acq_parcel" class="acq">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'acquisitions-search.inc' %]
25 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
26 [% IF invoiceclosedate %]
27 Receipt summary for <em>[% name | html %]</em>
29 <em>[ [% invoice | html %] ]</em>
32 Receive orders from [% name | html %]
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
42 [% IF ( receive_error ) %]
43 <div class="dialog alert">
44 <h3>Error adding items:</h3>
46 [% FOREACH error_loo IN error_loop %]
47 <li>[% error_loo.error_param | html %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate Barcode[% END %] <!-- todo: other error conditions come here. --></li>
53 [% IF ( invoiceclosedate ) %]
54 Receipt summary for <em>[% name | html %]</em> [% IF ( invoice ) %] <em> [ [% invoice | html %] ] </em>[% END %]
56 Receive orders from [% name | html %]
60 [% IF ( success_delorder ) %]
61 <div class="dialog message">The order has been successfully canceled.</div>
63 [% IF ( error_delitem ) %]
64 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
66 [% IF ( error_delbiblio ) %]
67 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
71 [% IF (error_cancelling_receipt) %]
72 <div class="dialog alert">
73 Cannot cancel receipt. Possible reasons :
76 The order line you are trying to cancel was created from a partial receipt
77 of another order line which is already received. Try to cancel this
81 The order line you are trying to cancel was created from a partial receipt
82 of another order line which has been deleted. Cancellation is not
89 [% IF error_invoice_not_known %]
90 <div class="dialog alert">
91 The invoice referenced by this invoiceid does not exist.
95 [% UNLESS no_orders_to_display %]
96 <div id="acqui_receive_summary">
97 <p><strong>Invoice number:</strong> [% invoice | html %] <strong>Shipment date:</strong> [% shipmentdate | $KohaDates %]</p>
99 [% UNLESS (invoiceclosedate) %]
100 <div id="acqui_receive_search">
101 <h3>Pending orders</h3>
103 [% IF ( loop_orders ) %]
104 <table id="pendingt">
107 <th>Basket search</th>
108 <th>Basket group search</th>
109 <th>Order line search</th>
110 <th>Summary search</th>
112 <th>Replacement price search</th>
113 <th>Quantity search</th>
114 <th>Unit cost search</th>
115 <th>Order cost search</th>
122 <th>Basket group</th>
126 <th>Replacement price</th>
135 <tbody class="filterclass">
136 [% FOREACH loop_order IN loop_orders %]
138 <td class="basketfilterclass"><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loop_order.basketno | uri %]">[% loop_order.basketname | html %] ([% loop_order.basketno | html %])</a></td>
140 [% IF loop_order.basketgroupid %]
141 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]&basketgroupid=[% loop_order.basketgroupid | uri %]">[% loop_order.basketgroupname | html %] ([% loop_order.basketgroupid | html %])</a>
146 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=[% loop_order.ordernumber | uri %]&booksellerid=[% loop_order.booksellerid | uri %]">[% loop_order.ordernumber | html %]</a></td>
147 <td class="summaryfilterclass">
148 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber | uri %]">[% loop_order.title | html %]</a>
149 [% IF ( loop_order.author ) %] by [% loop_order.author | html %][% END %]
150 [% IF ( loop_order.isbn ) %] – [% loop_order.isbn | html %][% END %]
151 [% IF ( loop_order.publishercode ) %]
152 <br />Publisher: [% loop_order.publishercode | html %]
153 [%- IF ( loop_order.publicationyear > 0) -%], [% loop_order.publicationyear | html %]
154 [%- ELSIF ( loop_order.copyrightdate > 0) -%] [% loop_order.copyrightdate | html %]
157 [% IF ( loop_order.suggestionid ) %]
159 Suggested by: <a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid | uri %]&op=show">[% loop_order.surnamesuggestedby | html %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby | html %] [% END %]( #[% loop_order.suggestionid | html %])</a>
162 [% IF ( loop_order.order_internalnote ) %]
163 <p class="ordernote"><strong>Internal note: </strong>[% loop_order.order_internalnote | html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber | uri %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=internal">Change internal note</a>]</p>
165 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber | uri %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=internal">Add internal note</a>]
167 [% IF ( loop_order.order_vendornote ) %]
168 <p class="ordernote"><strong>Vendor note: </strong>[% loop_order.order_vendornote | html %]</p>
170 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber | uri %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=vendor">Add vendor note</a>]
174 <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% loop_order.ordernumber | uri %]" class="previewData">[% tp('noun', 'Order') | html %]</a><br>
175 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber | uri %]" class="previewData">MARC</a><br>
176 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber | uri %]" class="previewData">Card</a>
178 <td>[% loop_order.replacementprice | $Price %]</td>
179 <td>[% loop_order.quantity | html %]</td>
180 <td>[% loop_order.ecost | $Price %]</td>
181 <td>[% loop_order.total | $Price %]</td>
182 <td>[% loop_order.budget_name | html %]</td>
184 <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber | uri %]&invoiceid=[% invoiceid | uri %]">Receive</a>
186 <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber | html %]); return false;">Transfer</a>
189 [% IF ( loop_order.left_holds_on_order ) %]
190 <span class="button" title="Can't cancel order, ([% loop_order.holds_on_order | html %]) holds are linked with this order. Cancel holds first">Can't cancel order</span><br>
192 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber | uri %]&biblionumber=[% loop_order.biblionumber | uri %]&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order</a><br />
194 [% IF ( loop_order.can_del_bib ) %]
195 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber | uri %]&biblionumber=[% loop_order.biblionumber | uri %]&del_biblio=1&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order and catalog record</a><br />
197 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
199 [% IF ( loop_order.left_item ) %]
200 <strong title="Can't delete catalog record, because of [% loop_order.items | html %] existing item(s)" >[% loop_order.items | html %] item(s) left</strong><br>
202 [% IF ( loop_order.left_biblio ) %]
203 <strong title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios | html %] order(s) left</strong><br>
205 [% IF ( loop_order.left_subscription ) %]
206 <strong title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions | html %] subscription(s) left</strong><br>
208 [% IF ( loop_order.left_holds ) %]
209 <strong title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds | html %] hold(s) left</strong>
216 [% ELSE %]There are no pending orders.[% END %]
220 Invoice is closed, so you can't receive orders anymore.
221 [% IF CAN_user_acquisition_reopen_closed_invoices %]
222 <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid | uri %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]">Reopen it</a>.
227 <div id="acqui_receive_receivelist">
228 <h3>Already received</h3>
230 [% IF ( loop_received ) %]
231 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
232 <table id="receivedt">
236 <th>Basket group</th>
238 <th title="Item holds / Total holds">Holds</th>
241 <th>Replacement price</th>
251 [% FOREACH key IN subtotal_for_funds.keys.sort %]
253 [% IF invoiceincgst %]
254 <td colspan="6" class="total">(Tax inc.)</td>
256 <td colspan="6" class="total">(Tax exc.)</td>
258 <td colspan="3"><em>Subtotal for</em> [% key | html %]</td>
259 <td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
260 <td>[% subtotal_for_funds.$key.unitprice | $Price %]</td>
266 <th colspan="11" class="total">Total tax exc.</th>
267 <th>[% total_tax_excluded | $Price %]</th>
270 [% FOREACH book_foot IN book_foot_loop %]
272 <th colspan="11">Total (GST [% book_foot.tax_rate * 100 | html %]%)</th>
273 <th>[% book_foot.tax_value | $Price %]</th>
278 <th colspan="11" class="total">Total tax inc.</th>
279 <th>[% total_tax_included | $Price %]</th>
283 <tbody class="filterclass">
284 [% FOREACH order IN loop_received %]
286 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno | uri %]"> [% order.basketname | html %] ([% order.basketno | html %])</a></td>
288 [% IF order.basketgroupid %]
289 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]">[% order.basketgroupname | html %] ([% order.basketgroupid | html %])</a>
295 <a href="neworderempty.pl?ordernumber=[% order.ordernumber | uri %]&booksellerid=[% booksellerid | uri %]">[% order.ordernumber | html %]</a>
296 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
297 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber | uri %]&booksellerid=[% booksellerid | uri %]" title="Original order line">[% order.parent_ordernumber | html %]</a>)
301 [% IF order.total_holds > 0 %]
302 [% IF order.item_holds > 0 %]
303 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.item_holds | html %]</a></span>
308 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.total_holds | html %]</a></span>
313 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">[% order.title | html %]</a>
314 [% IF ( order.author ) %] / [% order.author | html %][% END %]
315 [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
316 [% IF ( order.publishercode ) %]
317 <br />Publisher: [% order.publishercode | html %]
318 [%- IF ( order.publicationyear > 0) -%], [% order.publicationyear | html %]
319 [%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate | html %]
322 [% IF ( order.suggestionid ) %]
324 Suggested by: [% order.surnamesuggestedby | html %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby | html %] [% END %]
325 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid | uri %]&op=show">suggestion #[% order.suggestionid | html %]</a>)
328 [% IF ( order.order_internalnote ) %]
329 <p class="ordernote"><strong>Internal note: </strong>[% order.order_internalnote | html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% order.ordernumber | uri %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=internal">Change internal note</a>]</p>
331 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% order.ordernumber | uri %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=internal">Add internal note</a>]
333 [% IF ( order.order_vendornote ) %]
334 <p class="ordernote"><strong>Vendor note: </strong>[% order.order_vendornote | html %]</p>
336 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% order.ordernumber | uri %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]&type=vendor">Add vendor note</a>]
340 <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% order.ordernumber | uri %]" class="previewData">[% tp('noun', 'Order') | html %]</a><br>
341 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | uri %]" class="previewData">MARC</a><br>
342 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber | uri %]" class="previewData">Card</a>
344 <td>[% order.replacementprice | $Price %]</td>
345 <td>[% order.quantityreceived | html %]</td>
346 <td>[% order.budget.budget_name | html %]</td>
347 <td>[% order.ecost | $Price %]</td>
348 <td>[% order.unitprice | $Price %]</td>
349 <td>[% order.total | $Price %]</td>
351 [% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
352 [% IF loop_receive.cannot_cancel %]
353 [% span_title = BLOCK %]
354 Cannot cancel receipt of this order line because it
355 was created from a partial receipt of order line no.
356 [% order.parent_ordernumber | html %], which is
357 already received. Try cancelling this one first and
361 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
362 [%# Some additional checks should be added in the pl file %]
363 [% span_title = BLOCK %]
364 Cannot cancel receipt of this order line because at least one reservation exists on the records.
367 <span title="[% span_title | collapse | html %]">
371 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | uri %]&op=cancelreceipt&ordernumber=[% order.ordernumber | uri %]">Cancel receipt</a>
380 [% ELSE %]There are no received orders.[% END %]
383 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
384 <div class="modal-dialog">
385 <div class="modal-content">
386 <div class="modal-header">
387 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
388 <h3 id="dataPreviewLabel">MARC preview</h3>
390 <div class="modal-body">
391 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
393 <div class="modal-footer">
394 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
400 [% IF (invoiceclosedate) %]
401 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | uri %]">View invoice</a>
403 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
404 <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
405 <fieldset class="action">
406 <input type="submit" value="Finish receiving" />
414 </div> <!-- /.col-sm-10.col-sm-push-2 -->
416 <div class="col-sm-2 col-sm-pull-10">
419 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
420 <fieldset class="brief">
424 <label for="summaryfilter">ISBN, author or title:</label>
425 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter | html %]"/>
428 <label for="basketfilter">Basket name:</label>
429 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter | html %]"/>
432 <label for="basketgroupnamefilter">Basket group name:</label>
433 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter | html %]" />
436 <label for="orderfilter">Order line:</label>
437 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter | html %]"/>
441 <label for="eanfilter">EAN :</label>
442 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter | html %]"/>
446 <fieldset class="action">
447 <input type="hidden" value="search" name="op" />
448 <input type="hidden" value="[% invoiceid | html %]" name="invoiceid" />
449 <input type="submit" value="Filter" />
450 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | uri %]">Clear</a>
454 [% INCLUDE 'acquisitions-menu.inc' %]
456 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
457 </div> <!-- /.row -->
459 [% MACRO jsinclude BLOCK %]
460 [% Asset.js("js/acquisitions-menu.js") | $raw %]
461 [% INCLUDE 'datatables.inc' %]
462 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
463 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
464 <style>#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
466 dt_overwrite_html_sorting_localeCompare();
467 var sticky_filters = [% sticky_filters | html %];
469 $(document).ready(function(){
470 if ( $("#pendingt").length ) {
471 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
473 "iCookieDuration": 60*60*24*1000, // 1000 days
474 "iDisplayLength": 10,
475 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
477 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
482 { "sType": "num-html" },
483 { "sType": "anti-the" },
494 "sPaginationType": "full"
497 sPlaceHolder: "head:after",
515 if ( $("#receivedt").length ) {
516 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
518 "iCookieDuration": 60*60*24*1000, // 1000 days
519 "iDisplayLength": 10,
520 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
522 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
528 { "sType": "num-html" },
529 { "sType": "anti-the" },
539 "sPaginationType": "full"
543 // Keep filters from finishreceive.pl to parcel.pl
544 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
545 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
546 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
547 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
548 $.cookie("filter_parcel_ean", $("#eanfilter").val());
550 $("#filterform").on('submit', function(){
551 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
552 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
553 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
554 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
555 $.cookie("filter_parcel_ean", $("#eanfilter").val());
558 $(".previewData").on("click", function(e){
560 var ltitle = $(this).text();
561 var page = $(this).attr("href");
562 $("#dataPreviewLabel").text(ltitle);
563 $("#dataPreview .modal-body").load(page + " div");
564 $('#dataPreview').modal({show:true});
566 $("#dataPreview").on("hidden.bs.modal", function(){
567 $("#dataPreviewLabel").html("");
568 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
573 // Case-insensitive version of jquery's contains function
574 jQuery.extend(jQuery.expr[':'], {
575 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
578 // Contains exactly function
579 jQuery.extend(jQuery.expr[':'], {
580 containsExactly: "$(a).text() == m[3]"
583 function transfer_order_popup(ordernumber) {
584 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
585 + "ordernumber=" + ordernumber
586 window.open(url, 'TransferOrder');
591 [% INCLUDE 'intranet-bottom.inc' %]