2 [% USE currency = format('%.2f') -%]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Acquisitions › [% IF ( date ) %]
5 Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% formatteddatereceived %][% ELSE %]Receive orders from [% name %][% END %]</title>
6 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
10 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
11 [% INCLUDE 'greybox.inc' %]
12 <script type="text/javascript">
15 dt_overwrite_html_sorting_localeCompare();
17 var sticky_filters = [% sticky_filters %];
19 $(document).ready(function(){
20 if ( $("#pendingt").length ) {
21 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
23 "iCookieDuration": 60*60*24*1000, // 1000 days
25 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
27 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
32 { "sType": "num-html" },
43 "sPaginationType": "four_button"
46 sPlaceHolder: "head:after",
63 if ( $("#receivedt").length ) {
64 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
66 "iCookieDuration": 60*60*24*1000, // 1000 days
68 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
70 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
76 { "sType": "num-html" },
86 "sPaginationType": "four_button"
90 // Keep filters from finishreceive.pl to parcel.pl
91 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
92 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
93 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
94 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
95 $.cookie("filter_parcel_ean", $("#eanfilter").val());
97 $("#filterform").on('submit', function(){
98 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
99 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
100 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
101 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
102 $.cookie("filter_parcel_ean", $("#eanfilter").val());
107 // Case-insensitive version of jquery's contains function
108 jQuery.extend(jQuery.expr[':'], {
109 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
112 // Contains exactly function
113 jQuery.extend(jQuery.expr[':'], {
114 containsExactly: "$(a).text() == m[3]"
119 <script type="text/javascript">
121 function transfer_order_popup(ordernumber) {
122 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
123 + "ordernumber=" + ordernumber
124 window.open(url, 'TransferOrder');
130 <body id="acq_parcel" class="acq">
131 [% INCLUDE 'header.inc' %]
132 [% INCLUDE 'acquisitions-search.inc' %]
134 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
135 [% IF ( datereceived ) %]
136 Receipt summary for <i>[% name %]</i>
138 <i>[ [% invoice %] ]</i>
140 on <i>[% formatteddatereceived %]</i>
142 Receive orders from [% name %]
146 <div id="doc3" class="yui-t2">
151 [% IF ( receive_error ) %]
152 <div class="dialog alert">
153 <h3>Error adding items:</h3>
155 [% FOREACH error_loo IN error_loop %]
156 <li>[% error_loo.error_param %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate Barcode[% END %] <!-- todo: other error conditions come here. --></li>
162 [% IF ( datereceived ) %]
163 Receipt summary for <i>[% name %]</i> [% IF ( invoice ) %] <i> [ [% invoice %] ] </i>[% END %] on <i>[% formatteddatereceived %]</i>
165 Receive orders from [% name %]
169 [% IF ( success_delorder ) %]
170 <div class="dialog message">The order has been successfully canceled.</div>
172 [% IF ( error_delitem ) %]
173 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
175 [% IF ( error_delbiblio ) %]
176 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
180 [% IF (error_cancelling_receipt) %]
181 <div class="dialog error">
182 Cannot cancel receipt. Possible reasons :
185 The order line you trying to cancel was created from a partial receipt
186 of another order line which is already received. Try to cancel this
190 The order line you trying to cancel was created from a partial receipt
191 of another order line which has been deleted. Cancellation is not
198 [% IF error_invoice_not_known %]
199 <div class="dialog error">
200 The invoice referenced by this invoiceid does not exist.
204 [% UNLESS no_orders_to_display %]
205 <div id="acqui_receive_summary">
206 <p><strong>Invoice number:</strong> [% invoice %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% formatteddatereceived %]</p>
208 [% UNLESS (invoiceclosedate) %]
209 <div id="acqui_receive_search">
210 <h3>Pending orders</h3>
212 [% IF ( loop_orders ) %]
213 <table id="pendingt">
216 <th>Basket search</th>
217 <th>Basket group search</th>
218 <th>Order line search</th>
219 <th>Summary search</th>
221 <th>Quantity search</th>
222 <th>Unit cost search</th>
223 <th>Order cost search</th>
230 <th>Basket group</th>
242 <tbody class="filterclass">
243 [% FOREACH loop_order IN loop_orders %]
245 <td class="basketfilterclass">[% loop_order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loop_order.basketno %]">[% loop_order.basketno %]</a>)</td>
247 [% IF loop_order.basketgroupid %]
248 [% loop_order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% loop_order.booksellerid %]">[% loop_order.basketgroupid %]</a>)
253 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=[% loop_order.ordernumber %]&booksellerid=[% loop_order.booksellerid %]">[% loop_order.ordernumber %]</a></td>
254 <td class="summaryfilterclass">
255 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber %]">[% loop_order.title |html %]</a>
256 [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
257 [% IF ( loop_order.isbn ) %] – [% loop_order.isbn %][% END %]
258 [% IF ( loop_order.publishercode ) %]<br />Publisher:[% loop_order.publishercode %][% END %]
259 [% IF ( loop_order.suggestionid ) %]
261 Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
262 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&op=show">suggestion #[% loop_order.suggestionid %]</a>)
265 [% IF ( loop_order.order_internalnote ) %]
266 <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>
268 [<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>]
270 [% IF ( loop_order.order_vendornote ) %]
271 <p class="ordernote"><strong>Vendor note: </strong>[% loop_order.order_vendornote|html %]</p>
273 [<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>]
276 <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>
277 <td>[% loop_order.quantity %]</td>
278 <td>[% loop_order.ecost %]</td>
279 <td>[% loop_order.ordertotal %]</td>
280 <td>[% loop_order.budget_name %]</td>
282 <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber %]&invoiceid=[% invoiceid %]">Receive</a>
284 <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber %]); return false;">Transfer</a>
287 [% IF ( loop_order.left_holds_on_order ) %]
288 <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>
290 <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 />
292 [% IF ( loop_order.can_del_bib ) %]
293 <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 />
295 <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
297 [% IF ( loop_order.left_item ) %]
298 <b title="Can't delete catalog record, because of [% loop_order.items %] existing item(s)" >[% loop_order.items %] item(s) left</b><br>
300 [% IF ( loop_order.left_biblio ) %]
301 <b title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios %] order(s) left</b><br>
303 [% IF ( loop_order.left_subscription ) %]
304 <b title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions %] subscription(s) left</b><br>
306 [% IF ( loop_order.left_holds ) %]
307 <b title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds %] hold(s) left</b>
314 [% ELSE %]There are no pending orders.[% END %]
318 Invoice is closed, so you can't receive orders anymore.
319 <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Reopen it</a>.
323 <div id="acqui_receive_receivelist">
324 <h3>Already received</h3>
327 [% IF ( loop_received ) %]
329 [% SET estimated_total = 0 %]
331 [% FOREACH loop_receive IN loop_received %]
332 [% SET index = loop.count %]
333 [% SET funds.${ index }.budget_name = loop_receive.budget.budget_name %]
334 [% IF (funds.${ index }.estimated == '') %]
335 [% SET funds.${ index }.estimated = 0 %]
337 [% IF (funds.${ index }.actual == '') %]
338 [% SET funds.${ index }.actual = 0 %]
340 [% SET estimated_total = estimated_total + ( loop_receive.ecost * loop_receive.quantityreceived ) %]
341 [% SET funds.${ index }.estimated = funds.${ index }.estimated + ( loop_receive.ecost * loop_receive.quantityreceived )%]
343 [% SET funds.${ index }.actual = funds.${ loop_receive.budget.budget_name }.actual + loop_receive.total %]
346 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
347 <table id="receivedt">
351 <th>Basket group</th>
365 [% FOREACH key IN funds.keys.sort %]
367 <td colspan="6" class="total">(Tax exc.)</td>
368 <td colspan="2"><i>Subtotal for</i> [% funds.$key.budget_name %]</td>
369 <td>[% currency( funds.$key.estimated ) %]</td>
370 <td>[% currency( funds.$key.actual ) %]</td>
376 <th colspan="10" class="total">Total tax exc.</th>
377 <th>[% total_gste %]</th>
380 [% FOREACH book_foot IN book_foot_loop %]
382 <th colspan="10">Total (GST [% book_foot.gstrate * 100 | format ("%.1f") %]%)</th>
383 <th>[% book_foot.value %]</th>
388 <th colspan="10" class="total">Total tax inc.</th>
389 <th>[% total_gsti %]</th>
393 <tbody class="filterclass">
394 [% FOREACH order IN loop_received %]
396 <td>[% order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
398 [% IF order.basketgroupid %]
399 [% order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% order.booksellerid %]">[% order.basketgroupid %]</a>)
405 <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% booksellerid %]">[% order.ordernumber %]</a>
406 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
407 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber %]&booksellerid=[% booksellerid %]" title="Original order line">[% order.parent_ordernumber %]</a>)
411 [% IF order.holds > 0 %]
412 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.holds %]</a></span>
417 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
418 [% IF ( order.author ) %] / [% order.author %][% END %]
419 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
420 [% IF ( order.publishercode ) %]<br />Publisher :[% order.publishercode %][% END %]
421 [% IF ( order.suggestionid ) %]
423 Suggested by: [% order.surnamesuggestedby %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby %] [% END %]
424 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid %]&op=show">suggestion #[% order.suggestionid %]</a>)
427 <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>
428 <td>[% order.quantityreceived %]</td>
429 <td>[% order.budget.budget_name %]</td>
430 <td>[% order.ecost %]</td>
431 <td>[% order.unitprice %]</td>
432 <td>[% order.total %]</td>
434 [% IF loop_receive.cannot_cancel or ( Koha.Preference("AcqCreateItem") == "receiving" and loop_receive.holds > 0 ) %]
435 [% IF loop_receive.cannot_cancel %]
436 [% span_title = BLOCK %]
437 Cannot cancel receipt of this order line because it
438 was created from a partial receipt of order line no.
439 [% order.parent_ordernumber %], which is
440 already received. Try cancelling this one first and
444 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
445 [%# Some additional checks should be added in the pl file %]
446 [% span_title = BLOCK %]
447 Cannot cancel receipt of this order line because at least one reservation exists on the records.
450 <span title="[% span_title | collapse %]">
454 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&op=cancelreceipt&ordernumber=[% order.ordernumber %]">Cancel receipt</a>
462 [% ELSE %]There are no received orders.[% END %]
465 [% IF (invoiceclosedate) %]
466 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
468 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
469 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
470 <fieldset class="action">
471 <input type="submit" value="Finish receiving" />
483 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
484 <fieldset class="brief">
488 <label for="summaryfilter">ISBN, author or title :</label>
489 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter %]"/>
492 <label for="basketfilter">Basket :</label>
493 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter %]"/>
496 <label for="basketgroupnamefilter">Basket group name :</label>
497 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter %]" />
500 <label for="orderfilter">Order line :</label>
501 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter %]"/>
505 <label for="eanfilter">EAN :</label>
506 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter %]"/>
510 <fieldset class="action">
511 <input type="hidden" value="search" name="op" />
512 <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
513 <input type="submit" value="Filter" />
514 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
518 [% INCLUDE 'acquisitions-menu.inc' %]
521 [% INCLUDE 'intranet-bottom.inc' %]