1 [% USE currency = format('%.2f') -%]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Acquisitions › [% IF ( date ) %]
4 Receipt summary for [% name %] [% IF ( invoice ) %]invoice [% invoice %][% END %] on [% formatteddatereceived %][% ELSE %]Receive orders from [% name %][% END %]</title>
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'datatables.inc' %]
8 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
9 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
10 [% INCLUDE 'greybox.inc' %]
11 <script type="text/javascript">
14 dt_overwrite_html_sorting_localeCompare();
16 var sticky_filters = [% sticky_filters %];
18 $(document).ready(function(){
19 if ( $("#pendingt").length ) {
20 var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
22 "iCookieDuration": 60*60*24*1000, // 1000 days
24 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
26 { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
31 { "sType": "num-html" },
42 "sPaginationType": "four_button"
45 sPlaceHolder: "head:after",
62 if ( $("#receivedt").length ) {
63 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
65 "iCookieDuration": 60*60*24*1000, // 1000 days
67 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
69 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
75 { "sType": "num-html" },
85 "sPaginationType": "four_button"
89 // Keep filters from finishreceive.pl to parcel.pl
90 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
91 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
92 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
93 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
94 $.cookie("filter_parcel_ean", $("#eanfilter").val());
96 $("#filterform").on('submit', function(){
97 $.cookie("filter_parcel_summary", $("#summaryfilter").val());
98 $.cookie("filter_parcel_basketname", $("#basketfilter").val());
99 $.cookie("filter_parcel_orderno", $("#orderfilter").val());
100 $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
101 $.cookie("filter_parcel_ean", $("#eanfilter").val());
106 // Case-insensitive version of jquery's contains function
107 jQuery.extend(jQuery.expr[':'], {
108 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
111 // Contains exactly function
112 jQuery.extend(jQuery.expr[':'], {
113 containsExactly: "$(a).text() == m[3]"
118 <script type="text/javascript">
120 function confirm_delete_item(ordernumber, basketno, biblionumber) {
121 var is_confirmed = confirm(_("Are you sure you want to delete this order ?"));
123 window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&invoiceid=[% invoiceid %]";
127 function confirm_delete_biblio(ordernumber, basketno, biblionumber) {
128 var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?"));
130 window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1&invoiceid=[% invoiceid %]";
134 function transfer_order_popup(ordernumber) {
135 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
136 + "ordernumber=" + ordernumber
137 window.open(url, 'TransferOrder');
143 <body id="acq_parcel" class="acq">
144 [% INCLUDE 'header.inc' %]
145 [% INCLUDE 'acquisitions-search.inc' %]
147 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
148 [% IF ( datereceived ) %]
149 Receipt summary for <i>[% name %]</i>
151 <i>[ [% invoice %] ]</i>
153 on <i>[% formatteddatereceived %]</i>
155 Receive orders from [% name %]
159 <div id="doc3" class="yui-t2">
164 [% IF ( receive_error ) %]
165 <div class="dialog alert">
166 <h3>Error adding items:</h3>
168 [% FOREACH error_loo IN error_loop %]
169 <li>[% error_loo.error_param %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate Barcode[% END %] <!-- todo: other error conditions come here. --></li>
175 [% IF ( datereceived ) %]
176 Receipt summary for <i>[% name %]</i> [% IF ( invoice ) %] <i> [ [% invoice %] ] </i>[% END %] on <i>[% formatteddatereceived %]</i>
178 Receive orders from [% name %]
182 [% IF ( success_delorder ) %]
183 <div class="dialog message">The order has been successfully canceled.</div>
185 [% IF ( error_delitem ) %]
186 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
188 [% IF ( error_delbiblio ) %]
189 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
193 [% IF (error_cancelling_receipt) %]
194 <div class="dialog error">
195 Cannot cancel receipt. Possible reasons :
198 The order line you trying to cancel was created from a partial receipt
199 of another order line which is already received. Try to cancel this
203 The order line you trying to cancel was created from a partial receipt
204 of another order line which has been deleted. Cancellation is not
211 [% IF error_invoice_not_known %]
212 <div class="dialog error">
213 The invoice referenced by this invoiceid does not exist.
217 [% UNLESS no_orders_to_display %]
218 <div id="acqui_receive_summary">
219 <p><strong>Invoice number:</strong> [% invoice %] <strong>Received by:</strong> [% loggedinusername %] <strong>On:</strong> [% formatteddatereceived %]</p>
221 [% UNLESS (invoiceclosedate) %]
222 <div id="acqui_receive_search">
223 <h3>Pending orders</h3>
225 [% IF ( loop_orders ) %]
226 <table id="pendingt">
229 <th>Basket search</th>
230 <th>Basket group search</th>
231 <th>Order line search</th>
232 <th>Summary search</th>
234 <th>Quantity search</th>
235 <th>Unit cost search</th>
236 <th>Order cost search</th>
243 <th>Basket group</th>
255 <tbody class="filterclass">
256 [% FOREACH loop_order IN loop_orders %]
258 <td class="basketfilterclass">[% loop_order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% loop_order.basketno %]">[% loop_order.basketno %]</a>)</td>
260 [% IF loop_order.basketgroupid %]
261 [% loop_order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% loop_order.booksellerid %]">[% loop_order.basketgroupid %]</a>)
266 <td class="orderfilterclass"><a href="neworderempty.pl?ordernumber=[% loop_order.ordernumber %]&booksellerid=[% loop_order.booksellerid %]">[% loop_order.ordernumber %]</a></td>
267 <td class="summaryfilterclass">
268 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loop_order.biblionumber %]">[% loop_order.title |html %]</a>
269 [% IF ( loop_order.author ) %] by [% loop_order.author %][% END %]
270 [% IF ( loop_order.isbn ) %] – [% loop_order.isbn %][% END %]
271 [% IF ( loop_order.publishercode ) %]<br />Publisher:[% loop_order.publishercode %][% END %]
272 [% IF ( loop_order.suggestionid ) %]
274 Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %]
275 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&op=show">suggestion #[% loop_order.suggestionid %]</a>)
278 [% IF ( loop_order.order_internalnote ) %]
279 <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>
281 [<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>]
283 [% IF ( loop_order.order_vendornote ) %]
284 <p class="ordernote"><strong>Vendor note: </strong>[% loop_order.order_vendornote|html %]</p>
286 [<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>]
289 <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>
290 <td>[% loop_order.quantity %]</td>
291 <td>[% loop_order.ecost %]</td>
292 <td>[% loop_order.ordertotal %]</td>
293 <td>[% loop_order.budget_name %]</td>
295 <a href="orderreceive.pl?ordernumber=[% loop_order.ordernumber %]&invoiceid=[% invoiceid %]">Receive</a>
297 <a href="#" onclick="transfer_order_popup([% loop_order.ordernumber %]); return false;">Transfer</a>
300 [% IF ( loop_order.left_holds_on_order ) %]
301 <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>
303 <a href="javascript:confirm_delete_item([% loop_order.ordernumber %], [% loop_order.basketno %], [% loop_order.biblionumber %])" class="button">Delete order</a><br>
305 [% IF ( loop_order.can_del_bib ) %]
306 <a href="javascript:confirm_delete_biblio([% loop_order.ordernumber %], [% loop_order.basketno %], [% loop_order.biblionumber %])" class="button">Delete order and catalog record</a><br>
308 <span class="button" title="Can't delete catalog record, see constraints below">Can't delete order and catalog record</span><br>
310 [% IF ( loop_order.left_item ) %]
311 <b title="Can't delete catalog record, because of [% loop_order.items %] existing item(s)" >[% loop_order.items %] item(s) left</b><br>
313 [% IF ( loop_order.left_biblio ) %]
314 <b title="Can't delete catalog record, delete other orders linked to it first">[% loop_order.biblios %] order(s) left</b><br>
316 [% IF ( loop_order.left_subscription ) %]
317 <b title="Can't delete catalog record, delete subscriptions first">[% loop_order.subscriptions %] subscription(s) left</b><br>
319 [% IF ( loop_order.left_holds ) %]
320 <b title="Can't delete catalog record or order, cancel holds first">[% loop_order.holds %] hold(s) left</b>
327 [% ELSE %]There are no pending orders.[% END %]
331 Invoice is closed, so you can't receive orders anymore.
332 <a href="/cgi-bin/koha/acqui/invoice.pl?op=reopen&invoiceid=[% invoiceid %]&referer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid %]">Reopen it</a>.
336 <div id="acqui_receive_receivelist">
337 <h3>Already received</h3>
340 [% IF ( loop_received ) %]
342 [% SET estimated_total = 0 %]
344 [% FOREACH loop_receive IN loop_received %]
345 [% IF (funds.${ loop_receive.budget.budget_name }.estimated == '') %]
346 [% SET funds.${ loop_receive.budget.budget_name }.estimated = 0 %]
348 [% IF (funds.${ loop_receive.budget.budget_name }.actual == '') %]
349 [% SET funds.${ loop_receive.budget.budget_name }.actual = 0 %]
351 [% SET estimated_total = estimated_total + ( loop_receive.ecost * loop_receive.quantityreceived ) %]
352 [% SET funds.${ loop_receive.budget.budget_name }.estimated = funds.${ loop_receive.budget.budget_name }.estimated + ( loop_receive.ecost * loop_receive.quantityreceived )%]
353 [% SET funds.${ loop_receive.budget.budget_name }.actual = funds.${ loop_receive.budget.budget_name }.actual + loop_receive.total %]
356 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
357 <table id="receivedt">
361 <th>Basket group</th>
375 [% FOREACH key IN funds.keys.sort %]
377 <td colspan="6" class="total">(Tax exc.)</td>
378 <td><i>Subtotal for</i> [% key %]</td>
379 <td>[% currency( funds.$key.estimated ) %]</td>
380 <td>[% currency( funds.$key.actual ) %]</td>
386 <th colspan="10" class="total">Total tax exc.</th>
387 <th>[% total_gste %]</th>
390 [% FOREACH book_foot IN book_foot_loop %]
392 <th colspan="10">Total (GST [% book_foot.gstrate * 100 | format ("%.1f") %]%)</th>
393 <th>[% book_foot.value %]</th>
398 <th colspan="10" class="total">Total tax inc.</th>
399 <th>[% total_gsti %]</th>
403 <tbody class="filterclass">
404 [% FOREACH order IN loop_received %]
406 <td>[% order.basketname %] (<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno %]">[% order.basketno %]</a>)</td>
408 [% IF order.basketgroupid %]
409 [% order.basketgroupname %] (<a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% order.booksellerid %]">[% order.basketgroupid %]</a>)
415 <a href="neworderempty.pl?ordernumber=[% order.ordernumber %]&booksellerid=[% booksellerid %]">[% order.ordernumber %]</a>
416 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
417 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber %]&booksellerid=[% booksellerid %]" title="Original order line">[% order.parent_ordernumber %]</a>)
421 [% IF order.holds > 0 %]
422 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber %]">[% order.holds %]</a></span>
427 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber %]">[% order.title |html %]</a>
428 [% IF ( order.author ) %] / [% order.author %][% END %]
429 [% IF ( order.isbn ) %] - [% order.isbn %][% END %]
430 [% IF ( order.publishercode ) %]<br />Publisher :[% order.publishercode %][% END %]
431 [% IF ( order.suggestionid ) %]
433 Suggested by: [% order.surnamesuggestedby %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby %] [% END %]
434 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid %]&op=show">suggestion #[% order.suggestionid %]</a>)
437 <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>
438 <td>[% order.quantityreceived %]</td>
439 <td>[% order.budget.budget_name %]</td>
440 <td>[% order.ecost %]</td>
441 <td>[% order.unitprice %]</td>
442 <td>[% order.total %]</td>
444 [% IF (order.cannot_cancel) %]
445 [% span_title = BLOCK %]
446 Cannot cancel receipt of this order line because it
447 was created from a partial receipt of order line no.
448 [% order.parent_ordernumber %], which is
449 already received. Try cancelling this one first and
452 <span title="[% span_title | collapse %]">
456 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&op=cancelreceipt&ordernumber=[% order.ordernumber %]">Cancel receipt</a>
464 [% ELSE %]There are no received orders.[% END %]
467 [% IF (invoiceclosedate) %]
468 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid %]">View invoice</a>
470 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
471 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
472 <fieldset class="action">
473 <input type="submit" value="Finish receiving" />
485 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
486 <fieldset class="brief">
490 <label for="summaryfilter">ISBN, author or title :</label>
491 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter %]"/>
494 <label for="basketfilter">Basket :</label>
495 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter %]"/>
498 <label for="basketgroupnamefilter">Basket group name :</label>
499 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter %]" />
502 <label for="orderfilter">Order line :</label>
503 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter %]"/>
507 <label for="eanfilter">EAN :</label>
508 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter %]"/>
512 <fieldset class="action">
513 <input type="hidden" value="search" name="op" />
514 <input type="hidden" value="[% invoiceid %]" name="invoiceid" />
515 <input type="submit" value="Filter" />
516 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Clear</a>
520 [% INCLUDE 'acquisitions-menu.inc' %]
523 [% INCLUDE 'intranet-bottom.inc' %]