4 [% USE currency = format('%.2f') -%]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Acquisitions › [% IF ( date ) %]
7 Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% datereceived | $KohaDates %][% ELSE %]Receive orders from [% name %][% END %]</title>
8 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% INCLUDE 'datatables.inc' %]
11 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
12 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
13 [% INCLUDE 'greybox.inc' %]
14 <script type="text/javascript">
17 dt_overwrite_html_sorting_localeCompare();
19 var sticky_filters = [% sticky_filters %];
21 $(document).ready(function(){
22 if ( $("#pendingt").length ) {
23 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
25 "iCookieDuration": 60*60*24*1000, // 1000 days
27 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
29 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
34 { "sType": "num-html" },
45 "sPaginationType": "four_button"
48 sPlaceHolder: "head:after",
65 if ( $("#receivedt").length ) {
66 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
68 "iCookieDuration": 60*60*24*1000, // 1000 days
70 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
72 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
78 { "sType": "num-html" },
88 "sPaginationType": "four_button"
92 // Keep filters from finishreceive.pl to parcel.pl
93 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
94 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
95 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
96 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
97 $.cookie("filter_parcel_ean", $("#eanfilter").val());
99 $("#filterform").on('submit', function(){
100 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
101 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
102 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
103 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
104 $.cookie("filter_parcel_ean", $("#eanfilter").val());
109 // Case-insensitive version of jquery's contains function
110 jQuery.extend(jQuery.expr[':'], {
111 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
114 // Contains exactly function
115 jQuery.extend(jQuery.expr[':'], {
116 containsExactly: "$(a).text() == m[3]"
121 <script type="text/javascript">
123 function transfer_order_popup(ordernumber) {
124 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
125 + "ordernumber=" + ordernumber
126 window.open(url, 'TransferOrder');
132 <body id="acq_parcel" class="acq">
133 [% INCLUDE 'header.inc' %]
134 [% INCLUDE 'acquisitions-search.inc' %]
136 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
137 [% IF datereceived %]
138 Receipt summary for <i>[% name %]</i>
140 <i>[ [% invoice %] ]</i>
142 on <i>[% datereceived | $KohaDates %]</i>
144 Receive orders from [% name %]
148 <div id="doc3" class="yui-t2">
153 [% IF ( receive_error ) %]
154 <div class="dialog alert">
155 <h3>Error adding items:</h3>
157 [% FOREACH error_loo IN error_loop %]
158 <li>[% error_loo.error_param %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate Barcode[% END %] <!-- todo: other error conditions come here. --></li>
164 [% IF datereceived %]
165 Receipt summary for <i>[% name %]</i> [% IF ( invoice ) %] <i> [ [% invoice %] ] </i>[% END %] on <i>[% datereceived | $KohaDates %]</i>
167 Receive orders from [% name %]
171 [% IF ( success_delorder ) %]
172 <div class="dialog message">The order has been successfully canceled.</div>
174 [% IF ( error_delitem ) %]
175 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
177 [% IF ( error_delbiblio ) %]
178 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
182 [% IF (error_cancelling_receipt) %]
183 <div class="dialog error">
184 Cannot cancel receipt. Possible reasons :
187 The order line you trying to cancel was created from a partial receipt
188 of another order line which is already received. Try to cancel this
192 The order line you trying to cancel was created from a partial receipt
193 of another order line which has been deleted. Cancellation is not
200 [% IF error_invoice_not_known %]
201 <div class="dialog error">
202 The invoice referenced by this invoiceid does not exist.
206 [% UNLESS no_orders_to_display %]
207 <div id="acqui_receive_summary">
208 <p><strong>Invoice number:</strong> [% invoice %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% datereceived | $KohaDates %]</p>
210 [% UNLESS (invoiceclosedate) %]
211 <div id="acqui_receive_search">
212 <h3>Pending orders</h3>
214 [% IF ( loop_orders ) %]
215 <table id="pendingt">
218 <th>Basket search</th>
219 <th>Basket group search</th>
220 <th>Order line search</th>
221 <th>Summary search</th>
223 <th>Quantity search</th>
224 <th>Unit cost search</th>
225 <th>Order cost search</th>
232 <th>Basket group</th>
244 <tbody class="filterclass">
245 [% FOREACH loop_order IN loop_orders %]
247 <td class="basketfilterclass">[% loop_order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loop_order.basketno %]">[% loop_order.basketno %]</a>)</td>
249 [% IF loop_order.basketgroupid %]
250 [% loop_order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% loop_order.booksellerid %]">[% loop_order.basketgroupid %]</a>)
255 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=[% loop_order.ordernumber %]&booksellerid=[% loop_order.booksellerid %]">[% loop_order.ordernumber %]</a></td>
256 <td class="summaryfilterclass">
257 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber %]">[% loop_order.title |html %]</a>
258 [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
259 [% IF ( loop_order.isbn ) %] – [% loop_order.isbn %][% END %]
260 [% IF ( loop_order.publishercode ) %]<br />Publisher:[% loop_order.publishercode %][% END %]
261 [% IF ( loop_order.suggestionid ) %]
263 Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
264 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&op=show">suggestion #[% loop_order.suggestionid %]</a>)
267 [% IF ( loop_order.order_internalnote ) %]
268 <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>
270 [<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>]
272 [% IF ( loop_order.order_vendornote ) %]
273 <p class="ordernote"><strong>Vendor note: </strong>[% loop_order.order_vendornote|html %]</p>
275 [<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>]
278 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
279 <td>[% loop_order.quantity %]</td>
280 <td>[% loop_order.ecost | $Price %]</td>
281 <td>[% loop_order.total | $Price %]</td>
282 <td>[% loop_order.budget_name %]</td>
284 <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber %]&invoiceid=[% invoiceid %]">Receive</a>
286 <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber %]); return false;">Transfer</a>
289 [% IF ( loop_order.left_holds_on_order ) %]
290 <span class="button" title="Can't delete order, ([% loop_order.holds_on_order %]) holds are linked with this order cancel holds first">Can't delete order</span><br>
292 <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 %]">Delete order</a><br />
294 [% IF ( loop_order.can_del_bib ) %]
295 <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 %]">Delete order and catalog record</a><br />
297 <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
299 [% IF ( loop_order.left_item ) %]
300 <b title="Can't delete catalog record, because of [% loop_order.items %] existing item(s)" >[% loop_order.items %] item(s) left</b><br>
302 [% IF ( loop_order.left_biblio ) %]
303 <b title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios %] order(s) left</b><br>
305 [% IF ( loop_order.left_subscription ) %]
306 <b title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions %] subscription(s) left</b><br>
308 [% IF ( loop_order.left_holds ) %]
309 <b title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds %] hold(s) left</b>
316 [% ELSE %]There are no pending orders.[% END %]
320 Invoice is closed, so you can't receive orders anymore.
321 <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Reopen it</a>.
325 <div id="acqui_receive_receivelist">
326 <h3>Already received</h3>
328 [% IF ( loop_received ) %]
329 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
330 <table id="receivedt">
334 <th>Basket group</th>
348 [% FOREACH key IN subtotal_for_funds.keys.sort %]
350 [% IF invoiceincgst %]
351 <td colspan="6" class="total">(Tax inc.)</td>
353 <td colspan="6" class="total">(Tax exc.)</td>
355 <td colspan="2"><i>Subtotal for</i> [% funds.$key.budget_name %]</td>
356 <td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
357 <td>[% subtotal_for_funds.$key.unitprice | $Price %]</td>
363 <th colspan="10" class="total">Total tax exc.</th>
364 <th>[% total_gste | $Price %]</th>
367 [% FOREACH book_foot IN book_foot_loop %]
369 <th colspan="10">Total (GST [% book_foot.gstrate * 100 | $Price %]%)</th>
370 <th>[% book_foot.gstvalue | $Price %]</th>
375 <th colspan="10" class="total">Total tax inc.</th>
376 <th>[% total_gsti | $Price %]</th>
380 <tbody class="filterclass">
381 [% FOREACH order IN loop_received %]
383 <td>[% order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
385 [% IF order.basketgroupid %]
386 [% order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% order.booksellerid %]">[% order.basketgroupid %]</a>)
392 <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% booksellerid %]">[% order.ordernumber %]</a>
393 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
394 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber %]&booksellerid=[% booksellerid %]" title="Original order line">[% order.parent_ordernumber %]</a>)
398 [% IF order.holds > 0 %]
399 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.holds %]</a></span>
404 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
405 [% IF ( order.author ) %] / [% order.author %][% END %]
406 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
407 [% IF ( order.publishercode ) %]<br />Publisher :[% order.publishercode %][% END %]
408 [% IF ( order.suggestionid ) %]
410 Suggested by: [% order.surnamesuggestedby %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby %] [% END %]
411 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid %]&op=show">suggestion #[% order.suggestionid %]</a>)
414 <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td>
415 <td>[% order.quantityreceived %]</td>
416 <td>[% order.budget.budget_name %]</td>
417 <td>[% order.ecost | $Price %]</td>
418 <td>[% order.unitprice | $Price %]</td>
419 <td>[% order.total | $Price %]</td>
421 [% IF loop_receive.cannot_cancel or ( Koha.Preference("AcqCreateItem") == "receiving" and loop_receive.holds > 0 ) %]
422 [% IF loop_receive.cannot_cancel %]
423 [% span_title = BLOCK %]
424 Cannot cancel receipt of this order line because it
425 was created from a partial receipt of order line no.
426 [% order.parent_ordernumber %], which is
427 already received. Try cancelling this one first and
431 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
432 [%# Some additional checks should be added in the pl file %]
433 [% span_title = BLOCK %]
434 Cannot cancel receipt of this order line because at least one reservation exists on the records.
437 <span title="[% span_title | collapse %]">
441 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&op=cancelreceipt&ordernumber=[% order.ordernumber %]">Cancel receipt</a>
449 [% ELSE %]There are no received orders.[% END %]
452 [% IF (invoiceclosedate) %]
453 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
455 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
456 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
457 <fieldset class="action">
458 <input type="submit" value="Finish receiving" />
470 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
471 <fieldset class="brief">
475 <label for="summaryfilter">ISBN, author or title :</label>
476 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter %]"/>
479 <label for="basketfilter">Basket :</label>
480 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter %]"/>
483 <label for="basketgroupnamefilter">Basket group name :</label>
484 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter %]" />
487 <label for="orderfilter">Order line :</label>
488 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter %]"/>
492 <label for="eanfilter">EAN :</label>
493 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter %]"/>
497 <fieldset class="action">
498 <input type="hidden" value="search" name="op" />
499 <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
500 <input type="submit" value="Filter" />
501 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
505 [% INCLUDE 'acquisitions-menu.inc' %]
508 [% INCLUDE 'intranet-bottom.inc' %]