6 [% USE currency = format('%.2f') -%]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Acquisitions › [% IF ( date ) %]
10 Receipt summary for [% name | html %] [% IF ( invoice ) %]invoice [% invoice | html %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name | html %][% END %]</title>
11 [% Asset.css("css/datatables.css") | $raw %]
12 [% INCLUDE 'doc-head-close.inc' %]
15 <body id="acq_parcel" class="acq">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'acquisitions-search.inc' %]
19 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
21 Receipt summary for <i>[% name | html %]</i>
23 <i>[ [% invoice | html %] ]</i>
25 on <i>[% datereceived | $KohaDates %]</i>
27 Receive orders from [% name | html %]
32 <div class="main container-fluid">
34 <div class="col-sm-10 col-sm-push-2">
37 [% IF ( receive_error ) %]
38 <div class="dialog alert">
39 <h3>Error adding items:</h3>
41 [% FOREACH error_loo IN error_loop %]
42 <li>[% error_loo.error_param | html %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate Barcode[% END %] <!-- todo: other error conditions come here. --></li>
49 Receipt summary for <i>[% name | html %]</i> [% IF ( invoice ) %] <i> [ [% invoice | html %] ] </i>[% END %] on <i>[% datereceived | $KohaDates %]</i>
51 Receive orders from [% name | html %]
55 [% IF ( success_delorder ) %]
56 <div class="dialog message">The order has been successfully canceled.</div>
58 [% IF ( error_delitem ) %]
59 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
61 [% IF ( error_delbiblio ) %]
62 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
66 [% IF (error_cancelling_receipt) %]
67 <div class="dialog error">
68 Cannot cancel receipt. Possible reasons :
71 The order line you trying to cancel was created from a partial receipt
72 of another order line which is already received. Try to cancel this
76 The order line you trying to cancel was created from a partial receipt
77 of another order line which has been deleted. Cancellation is not
84 [% IF error_invoice_not_known %]
85 <div class="dialog error">
86 The invoice referenced by this invoiceid does not exist.
90 [% UNLESS no_orders_to_display %]
91 <div id="acqui_receive_summary">
92 <p><strong>Invoice number:</strong> [% invoice | html %] <strong>Received by:</strong> [% logged_in_user.userid | html %]<strong>On:</strong> [% datereceived | $KohaDates %]</p>
94 [% UNLESS (invoiceclosedate) %]
95 <div id="acqui_receive_search">
96 <h3>Pending orders</h3>
98 [% IF ( loop_orders ) %]
102 <th>Basket search</th>
103 <th>Basket group search</th>
104 <th>Order line search</th>
105 <th>Summary search</th>
107 <th>Quantity search</th>
108 <th>Unit cost search</th>
109 <th>Order cost search</th>
116 <th>Basket group</th>
128 <tbody class="filterclass">
129 [% FOREACH loop_order IN loop_orders %]
131 <td class="basketfilterclass">[% loop_order.basketname | html %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loop_order.basketno | html %]">[% loop_order.basketno | html %]</a>)</td>
133 [% IF loop_order.basketgroupid %]
134 [% loop_order.basketgroupname | html %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% loop_order.booksellerid | html %]">[% loop_order.basketgroupid | html %]</a>)
139 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=[% loop_order.ordernumber | html %]&booksellerid=[% loop_order.booksellerid | html %]">[% loop_order.ordernumber | html %]</a></td>
140 <td class="summaryfilterclass">
141 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber | html %]">[% loop_order.title | html %]</a>
142 [% IF ( loop_order.author ) %] by [% loop_order.author | html %][% END %]
143 [% IF ( loop_order.isbn ) %] – [% loop_order.isbn | html %][% END %]
144 [% IF ( loop_order.publishercode ) %]
145 <br />Publisher: [% loop_order.publishercode | html %]
146 [%- IF ( loop_order.publicationyear > 0) -%], [% loop_order.publicationyear | html %]
147 [%- ELSIF ( loop_order.copyrightdate > 0) -%] [% loop_order.copyrightdate | html %]
150 [% IF ( loop_order.suggestionid ) %]
152 Suggested by: [% loop_order.surnamesuggestedby | html %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby | html %] [% END %]
153 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid | html %]&op=show">suggestion #[% loop_order.suggestionid | html %]</a>)
156 [% IF ( loop_order.order_internalnote ) %]
157 <p class="ordernote"><strong>Internal note: </strong>[% loop_order.order_internalnote | html %] [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber | html %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | html %]&type=internal">Change internal note</a>]</p>
159 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber | html %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | html %]&type=internal">Add internal note</a>]
161 [% IF ( loop_order.order_vendornote ) %]
162 <p class="ordernote"><strong>Vendor note: </strong>[% loop_order.order_vendornote | html %]</p>
164 [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% loop_order.ordernumber | html %]&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | html %]&type=vendor">Add vendor note</a>]
168 <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% loop_order.ordernumber | html %]" class="previewData">Order</a><br>
169 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber | html %]" class="previewData">MARC</a><br>
170 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber | html %]" class="previewData">Card</a>
172 <td>[% loop_order.quantity | html %]</td>
173 <td>[% loop_order.ecost | $Price | html %]</td>
174 <td>[% loop_order.total | $Price | html %]</td>
175 <td>[% loop_order.budget_name | html %]</td>
177 <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber | html %]&invoiceid=[% invoiceid | html %]">Receive</a>
179 <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber | html %]); return false;">Transfer</a>
182 [% IF ( loop_order.left_holds_on_order ) %]
183 <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>
185 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber | html %]&biblionumber=[% loop_order.biblionumber | html %]&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order</a><br />
187 [% IF ( loop_order.can_del_bib ) %]
188 <a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber=[% loop_order.ordernumber | html %]&biblionumber=[% loop_order.biblionumber | html %]&del_biblio=1&referrer=[% "/cgi-bin/koha/acqui/parcel.pl?invoiceid=$invoiceid" | uri %]">Cancel order and catalog record</a><br />
190 <span class="button" title="Can't delete catalog record, see constraints below">Can't cancel order and delete catalog record</span><br>
192 [% IF ( loop_order.left_item ) %]
193 <b title="Can't delete catalog record, because of [% loop_order.items | html %] existing item(s)" >[% loop_order.items | html %] item(s) left</b><br>
195 [% IF ( loop_order.left_biblio ) %]
196 <b title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios | html %] order(s) left</b><br>
198 [% IF ( loop_order.left_subscription ) %]
199 <b title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions | html %] subscription(s) left</b><br>
201 [% IF ( loop_order.left_holds ) %]
202 <b title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds | html %] hold(s) left</b>
209 [% ELSE %]There are no pending orders.[% END %]
213 Invoice is closed, so you can't receive orders anymore.
214 <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid | html %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | html %]">Reopen it</a>.
218 <div id="acqui_receive_receivelist">
219 <h3>Already received</h3>
221 [% IF ( loop_received ) %]
222 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
223 <table id="receivedt">
227 <th>Basket group</th>
229 <th title="Item holds / Total holds">Holds</th>
241 [% FOREACH key IN subtotal_for_funds.keys.sort %]
243 [% IF invoiceincgst %]
244 <td colspan="6" class="total">(Tax inc.)</td>
246 <td colspan="6" class="total">(Tax exc.)</td>
248 <td colspan="2"><i>Subtotal for</i> [% key | html %]</td>
249 <td>[% subtotal_for_funds.$key.ecost | $Price | html %]</td>
250 <td>[% subtotal_for_funds.$key.unitprice | $Price | html %]</td>
256 <th colspan="10" class="total">Total tax exc.</th>
257 <th>[% total_tax_excluded | $Price | html %]</th>
260 [% FOREACH book_foot IN book_foot_loop %]
262 <th colspan="10">Total (GST [% book_foot.tax_rate * 100 | html %]%)</th>
263 <th>[% book_foot.tax_value | $Price | html %]</th>
268 <th colspan="10" class="total">Total tax inc.</th>
269 <th>[% total_tax_included | $Price | html %]</th>
273 <tbody class="filterclass">
274 [% FOREACH order IN loop_received %]
276 <td>[% order.basketname | html %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno | html %]">[% order.basketno | html %]</a>)</td>
278 [% IF order.basketgroupid %]
279 [% order.basketgroupname | html %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% order.booksellerid | html %]">[% order.basketgroupid | html %]</a>)
285 <a href="neworderempty.pl?ordernumber=[% order.ordernumber | html %]&booksellerid=[% booksellerid | html %]">[% order.ordernumber | html %]</a>
286 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
287 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber | html %]&booksellerid=[% booksellerid | html %]" title="Original order line">[% order.parent_ordernumber | html %]</a>)
291 [% IF order.total_holds > 0 %]
292 [% IF order.item_holds > 0 %]
293 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | html %]">[% order.item_holds | html %]</a></span>
298 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | html %]">[% order.total_holds | html %]</a></span>
303 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | html %]">[% order.title | html %]</a>
304 [% IF ( order.author ) %] / [% order.author | html %][% END %]
305 [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
306 [% IF ( order.publishercode ) %]
307 <br />Publisher: [% order.publishercode | html %]
308 [%- IF ( order.publicationyear > 0) -%], [% order.publicationyear | html %]
309 [%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate | html %]
312 [% IF ( order.suggestionid ) %]
314 Suggested by: [% order.surnamesuggestedby | html %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby | html %] [% END %]
315 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid | html %]&op=show">suggestion #[% order.suggestionid | html %]</a>)
319 <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% order.ordernumber | html %]" class="previewData">Order</a><br>
320 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | html %]" class="previewData">MARC</a><br>
321 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber | html %]" class="previewData">Card</a>
323 <td>[% order.quantityreceived | html %]</td>
324 <td>[% order.budget.budget_name | html %]</td>
325 <td>[% order.ecost | $Price | html %]</td>
326 <td>[% order.unitprice | $Price | html %]</td>
327 <td>[% order.total | $Price | html %]</td>
329 [% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
330 [% IF loop_receive.cannot_cancel %]
331 [% span_title = BLOCK %]
332 Cannot cancel receipt of this order line because it
333 was created from a partial receipt of order line no.
334 [% order.parent_ordernumber | html %], which is
335 already received. Try cancelling this one first and
339 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
340 [%# Some additional checks should be added in the pl file %]
341 [% span_title = BLOCK %]
342 Cannot cancel receipt of this order line because at least one reservation exists on the records.
345 <span title="[% span_title | collapse | html %]">
349 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | html %]&op=cancelreceipt&ordernumber=[% order.ordernumber | html %]">Cancel receipt</a>
358 [% ELSE %]There are no received orders.[% END %]
361 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
362 <div class="modal-dialog">
363 <div class="modal-content">
364 <div class="modal-header">
365 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
366 <h3 id="dataPreviewLabel">MARC preview</h3>
368 <div class="modal-body">
369 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
371 <div class="modal-footer">
372 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
378 [% IF (invoiceclosedate) %]
379 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | html %]">View invoice</a>
381 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
382 <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
383 <fieldset class="action">
384 <input type="submit" value="Finish receiving" />
392 </div> <!-- /.col-sm-10.col-sm-push-2 -->
394 <div class="col-sm-2 col-sm-pull-10">
397 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
398 <fieldset class="brief">
402 <label for="summaryfilter">ISBN, author or title :</label>
403 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter | html %]"/>
406 <label for="basketfilter">Basket :</label>
407 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter | html %]"/>
410 <label for="basketgroupnamefilter">Basket group name :</label>
411 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter | html %]" />
414 <label for="orderfilter">Order line :</label>
415 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter | html %]"/>
419 <label for="eanfilter">EAN :</label>
420 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter | html %]"/>
424 <fieldset class="action">
425 <input type="hidden" value="search" name="op" />
426 <input type="hidden" value="[% invoiceid | html %]" name="invoiceid" />
427 <input type="submit" value="Filter" />
428 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | html %]">Clear</a>
432 [% INCLUDE 'acquisitions-menu.inc' %]
434 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
435 </div> <!-- /.row -->
437 [% MACRO jsinclude BLOCK %]
438 [% Asset.js("js/acquisitions-menu.js") | $raw %]
439 [% INCLUDE 'datatables.inc' %]
440 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
441 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
442 <style>#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
444 dt_overwrite_html_sorting_localeCompare();
445 var sticky_filters = [% sticky_filters | html %];
447 $(document).ready(function(){
448 if ( $("#pendingt").length ) {
449 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
451 "iCookieDuration": 60*60*24*1000, // 1000 days
452 "iDisplayLength": 10,
453 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
455 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
460 { "sType": "num-html" },
461 { "sType": "anti-the" },
471 "sPaginationType": "four_button"
474 sPlaceHolder: "head:after",
491 if ( $("#receivedt").length ) {
492 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
494 "iCookieDuration": 60*60*24*1000, // 1000 days
495 "iDisplayLength": 10,
496 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
498 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
504 { "sType": "num-html" },
505 { "sType": "anti-the" },
514 "sPaginationType": "four_button"
518 // Keep filters from finishreceive.pl to parcel.pl
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());
525 $("#filterform").on('submit', function(){
526 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
527 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
528 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
529 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
530 $.cookie("filter_parcel_ean", $("#eanfilter").val());
533 $(".previewData").on("click", function(e){
535 var ltitle = $(this).text();
536 var page = $(this).attr("href");
537 $("#dataPreviewLabel").text(ltitle);
538 $("#dataPreview .modal-body").load(page + " div");
539 $('#dataPreview').modal({show:true});
541 $("#dataPreview").on("hidden", function(){
542 $("#dataPreviewLabel").html("");
543 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
548 // Case-insensitive version of jquery's contains function
549 jQuery.extend(jQuery.expr[':'], {
550 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
553 // Contains exactly function
554 jQuery.extend(jQuery.expr[':'], {
555 containsExactly: "$(a).text() == m[3]"
558 function transfer_order_popup(ordernumber) {
559 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
560 + "ordernumber=" + ordernumber
561 window.open(url, 'TransferOrder');
566 [% INCLUDE 'intranet-bottom.inc' %]