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>
102 <table id="pending_orders" class="table table-bordered table-striped">
106 <th>Basket group</th>
108 <th class="hidden">Title</th>
109 <th class="hidden">Author</th>
110 <th class="hidden">ISBN</th>
113 <th>Replacement price</th>
126 Invoice is closed, so you can't receive orders anymore.
127 [% IF CAN_user_acquisition_reopen_closed_invoices %]
128 <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>.
133 <div id="acqui_receive_receivelist">
134 <h3>Already received</h3>
136 [% IF ( loop_received ) %]
137 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
138 <table id="receivedt">
142 <th>Basket group</th>
144 <th title="Item holds / Total holds">Holds</th>
147 <th>Replacement price</th>
157 [% FOREACH key IN subtotal_for_funds.keys.sort %]
159 [% IF invoiceincgst %]
160 <td colspan="6" class="total">(Tax inc.)</td>
162 <td colspan="6" class="total">(Tax exc.)</td>
164 <td colspan="3"><em>Subtotal for</em> [% key | html %]</td>
165 <td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
166 <td>[% subtotal_for_funds.$key.unitprice | $Price %]</td>
172 <th colspan="11" class="total">Total tax exc.</th>
173 <th>[% total_tax_excluded | $Price %]</th>
176 [% FOREACH book_foot IN book_foot_loop %]
178 <th colspan="11">Total (GST [% book_foot.tax_rate * 100 | html %]%)</th>
179 <th>[% book_foot.tax_value | $Price %]</th>
184 <th colspan="11" class="total">Total tax inc.</th>
185 <th>[% total_tax_included | $Price %]</th>
189 <tbody class="filterclass">
190 [% FOREACH order IN loop_received %]
192 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno | uri %]"> [% order.basketname | html %] ([% order.basketno | html %])</a></td>
194 [% IF order.basketgroupid %]
195 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]">[% order.basketgroupname | html %] ([% order.basketgroupid | html %])</a>
201 <a href="neworderempty.pl?ordernumber=[% order.ordernumber | uri %]&booksellerid=[% booksellerid | uri %]">[% order.ordernumber | html %]</a>
202 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
203 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber | uri %]&booksellerid=[% booksellerid | uri %]" title="Original order line">[% order.parent_ordernumber | html %]</a>)
207 [% IF order.total_holds > 0 %]
208 [% IF order.item_holds > 0 %]
209 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.item_holds | html %]</a></span>
214 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.total_holds | html %]</a></span>
219 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% order.biblionumber | uri %]">[% order.title | html %]</a>
220 [% IF ( order.author ) %] / [% order.author | html %][% END %]
221 [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
222 [% IF ( order.publishercode ) %]
223 <br />Publisher: [% order.publishercode | html %]
224 [%- IF ( order.publicationyear > 0) -%], [% order.publicationyear | html %]
225 [%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate | html %]
228 [% IF ( order.suggestionid ) %]
230 Suggested by: [% order.surnamesuggestedby | html %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby | html %] [% END %]
231 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid | uri %]&op=show">suggestion #[% order.suggestionid | html %]</a>)
234 [% IF ( order.order_internalnote ) %]
235 <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>
237 [<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>]
239 [% IF ( order.order_vendornote ) %]
240 <p class="ordernote"><strong>Vendor note: </strong>[% order.order_vendornote | html %]</p>
242 [<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>]
246 <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% order.ordernumber | uri %]" class="previewData">[% tp('noun', 'Order') | html %]</a><br>
247 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | uri %]" class="previewData">MARC</a><br>
248 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber | uri %]" class="previewData">Card</a>
250 <td>[% order.replacementprice | $Price %]</td>
251 <td>[% order.quantityreceived | html %]</td>
252 <td>[% order.budget.budget_name | html %]</td>
253 <td>[% order.ecost | $Price %]</td>
254 <td>[% order.unitprice | $Price %]</td>
255 <td>[% order.total | $Price %]</td>
257 [% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
258 [% IF loop_receive.cannot_cancel %]
259 [% span_title = BLOCK %]
260 Cannot cancel receipt of this order line because it
261 was created from a partial receipt of order line no.
262 [% order.parent_ordernumber | html %], which is
263 already received. Try cancelling this one first and
267 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
268 [%# Some additional checks should be added in the pl file %]
269 [% span_title = BLOCK %]
270 Cannot cancel receipt of this order line because at least one reservation exists on the records.
273 <span title="[% span_title | collapse | html %]">
277 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | uri %]&op=cancelreceipt&ordernumber=[% order.ordernumber | uri %]">Cancel receipt</a>
286 [% ELSE %]There are no received orders.[% END %]
289 <div id="dataPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel" aria-hidden="true">
290 <div class="modal-dialog">
291 <div class="modal-content">
292 <div class="modal-header">
293 <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
294 <h3 id="dataPreviewLabel">MARC preview</h3>
296 <div class="modal-body">
297 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
299 <div class="modal-footer">
300 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
306 [% IF (invoiceclosedate) %]
307 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | uri %]">View invoice</a>
309 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
310 <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
311 <fieldset class="action">
312 <input type="submit" value="Finish receiving" />
320 </div> <!-- /.col-sm-10.col-sm-push-2 -->
322 <div class="col-sm-2 col-sm-pull-10">
325 <form action="/cgi-bin/koha/acqui/parcel.pl" id="filterform" method="post">
326 <fieldset class="brief">
330 <label for="summaryfilter">ISBN, author or title:</label>
331 <input type="text" name="summaryfilter" id="summaryfilter" value="[% summaryfilter | html %]"/>
334 <label for="basketfilter">Basket name:</label>
335 <input type="text" name="basketfilter" id="basketfilter" value="[% basketfilter | html %]"/>
338 <label for="basketgroupnamefilter">Basket group name:</label>
339 <input type="text" name="basketgroupnamefilter" id="basketgroupnamefilter" value="[% basketgroupnamefilter | html %]" />
342 <label for="orderfilter">Order line:</label>
343 <input type="text" name="orderfilter" id="orderfilter" value="[% orderfilter | html %]"/>
347 <label for="eanfilter">EAN:</label>
348 <input type="text" name="eanfilter" id="eanfilter" value="[% eanfilter | html %]"/>
352 <fieldset class="action">
353 <input type="hidden" value="search" name="op" />
354 <input type="hidden" value="[% invoiceid | html %]" name="invoiceid" />
355 <input type="submit" value="Filter" />
356 <a href="#" id="clear_form_filters">Clear</a>
360 [% INCLUDE 'acquisitions-menu.inc' %]
362 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
363 </div> <!-- /.row -->
365 [% MACRO jsinclude BLOCK %]
366 [% Asset.js("js/acquisitions-menu.js") | $raw %]
367 [% INCLUDE 'datatables.inc' %]
368 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
369 [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
370 <style>#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
372 dt_overwrite_html_sorting_localeCompare();
373 var sticky_filters = [% sticky_filters | html %];
375 function query_from_filters( base_query, params ) {
379 if ( params.basket_name != "" ) {
380 query_and.push( { "basket.name": { "like": '%'+params.basket_name+'%' } } );
382 if (params.basket_group != "") {
383 query_and.push( { "basket.basket_group.name": { "like": '%'+params.basket_group+'%' } } );
385 if (params.summary != "") {
386 query_and.push( { "-or": [{"biblio.title": { "like": '%'+params.summary+'%' } },
387 {"biblio.author": { "like": '%'+params.summary+'%' } },
388 {"biblio.isbn": { "like": '%'+params.summary+'%' } } ] } );
390 if (params.ean != "") {
391 query_and.push( { "biblio.ean": params.ean } );
394 var query_params = [];
396 if ( query_and.length > 0 ) {
397 query_and.push(base_query);
398 query_params.push('q=' + encodeURIComponent(JSON.stringify({ "-and": query_and })));
401 if ( params.order_id != "" ) {
402 query_params.push("order_id="+params.order_id);
408 $(document).ready(function(){
410 if ( $("#receivedt").length ) {
411 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
413 "iCookieDuration": 60*60*24*1000, // 1000 days
414 "iDisplayLength": 10,
415 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
417 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
423 { "sType": "num-html" },
424 { "sType": "anti-the" },
434 "sPaginationType": "full"
438 var base_query = { "basket.vendor_id": [% booksellerid | html %] };
440 var summary = $("#summaryfilter").val();
441 var basket_name = $("#basketfilter").val();
442 var basket_group = $("#basketgroupnamefilter").val();
443 var order_id = $("#orderfilter").val();
444 var ean = $("#eanfilter").val();
446 var query_params = query_from_filters(
450 "basket_name": basket_name,
451 "basket_group": basket_group,
452 "order_id": order_id,
453 "ean": (ean === undefined) ? '' : ean // ean == undefined if the DOM doens't have it
457 var THE_query = query_params.join("&");
459 var pending_orders_url = '/api/v1/acquisitions/orders?only_active=1';
460 var pending_orders_table = $("#pending_orders").api({
462 "url": pending_orders_url + '&' + THE_query
464 "header_filter": true,
466 "basket.basket_group",
467 "biblio.active_orders+count",
468 "biblio.holds+count",
469 "biblio.items+count",
470 "biblio.suggestions.suggester",
472 "current_item_level_holds+count",
475 'dom': 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
476 "drawCallback": function (settings) {
477 $(".previewData").on("click", function(e){
479 var ltitle = $(this).text();
480 var page = $(this).attr("href");
481 $("#dataPreviewLabel").text(ltitle);
482 $("#dataPreview .modal-body").load(page + " div");
483 $('#dataPreview').modal({show:true});
487 "targets": [3,4,5,9],
488 "render": function (data, type, row, meta) {
489 if ( data != null ) {
490 return data.escapeHtml();
499 "render": function (data, type, row, meta) {
500 if ( data != null ) {
501 return data.escapeHtml().format_price();
509 { "data": "basket.name",
511 "render": function(data, type, row, meta) {
512 if (type != 'display') return data;
513 return "<a href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + row.basket.basket_id + "\">" + data + " (" + row.basket.basket_id + ")</a>";
516 { "data": "basket.basket_group.name",
518 "render": function(data, type, row, meta) {
519 if ( type != 'display' ) {
520 if ( data == null ) {
527 if ( row.basket.basket_group_id == null ) {
528 return _("No basket group");
531 return "<a href=\"/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid="
532 + row.basket.vendor_id + "&basketgroupid="
533 + row.basket.basket_group_id + "\">"
534 + row.basket.basket_group.name + " (" + row.basket.basket_group_id + ")</a>";
540 "render": function(data, type, row, meta) {
541 if (type != 'display') return data;
542 return "<a href=\"neworderempty.pl?ordernumber="+data+"&booksellerid="+row.basket.vendor_id+"\">"+data+"</a>";
546 "data": "biblio.author",
552 "data": "biblio.title",
558 "data": "biblio.isbn",
564 "data": function(row, type, val, meta) {
566 if ( row.biblio_id != null ) {
567 result = "<p><a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber="+encodeURIComponent(row.biblio_id)+"\">"+row.biblio.title.escapeHtml()+"</a>";
568 if ( row.biblio.author != null )
569 result += _(" by ") + row.biblio.author.escapeHtml();
570 if ( row.biblio.isbn != null )
571 result += " – " + row.biblio.isbn.escapeHtml();
572 if ( row.biblio.publisher != null ) {
573 result += "<br/>" + _("Publisher: ") + row.biblio.publisher.escapeHtml();
574 if ( row.biblio.publication_year != null ) {
575 result += ", " + row.biblio.publication_year.escapeHtml();
577 else if ( row.biblio.copyright_date != null ) {
578 result += row.biblio.copyright_date.escapeHtml();
581 var suggestions = row.biblio.suggestions;
582 if ( suggestions != null && suggestions.length > 0 ) {
583 var suggestion = suggestions[0];
584 if ( suggestion.suggester != null ) {
585 var suggester = suggestion.suggester;
586 var suggested_by = [];
587 if ( suggester.surname != null ) {
588 suggested_by.push(suggester.surname.escapeHtml());
590 if ( suggester.firstname != null ) {
591 suggested_by.push(suggester.firstname.escapeHtml());
594 result += "<br/>" + _("Suggested by: ") +
595 '<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid='
596 + encodeURIComponent(suggestion.suggestionid)
598 + suggested_by.join(", ")
599 + " (#" + suggestions[0].suggestionid + ")</a>"; // FIXME: could be changed if we allow matching multiple suggestions
605 var internal_note = row.internal_note;
606 if ( internal_note != null && internal_note != '' ) {
607 result += '<p class="ordernote"><strong>'
608 + _("Internal note: ")
609 + '</strong>' + internal_note.escapeHtml()
610 + ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
611 + encodeURIComponent(row.order_id) + '&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
612 + '&type=internal">' + _("Change internal note") + '</a>]</p>';
615 result += ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
616 + encodeURIComponent(row.order_id) + '&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
617 + '&type=internal">' + _("Add internal note") + '</a>]';
620 var vendor_note = row.vendor_note;
621 if ( vendor_note != null && vendor_note != '' ) {
622 result += '<p class="ordernote"><strong>'
624 + '</strong>' + vendor_note.escapeHtml() + '</p>';
627 result += ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
628 + encodeURIComponent(row.order_id) + '&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
629 + '&type=vendor">' + _("Add vendor note") + '</a>]';
637 "data": function( row, type, val, meta) {
638 var result = '<a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">' + _("Order") + '</a><br>'
639 + '<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("MARC") + '</a><br>'
640 + '<a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("Card") + '</a>';
646 "data": "replacement_price"
656 "data": function ( row, type, val, meta ) {
657 return (row.quantity * row.ecost).format_price();
659 "orderable": false // FIXME: How can we do it in DBIC?
663 "render": function(data, type, row, meta) {
664 if (type != 'display') return data.escapeHtml();
665 return row.fund.name.escapeHtml();
669 "data": function( row, type, val, meta ) {
670 return '<a href="orderreceive.pl?ordernumber='
671 + encodeURIComponent(row.order_id) + '&invoiceid=[% invoiceid | uri %]' + '">'
672 + _("Receive") + '</a><br/>'
673 + '<a href="#" onclick="transfer_order_popup(' + row.order_id.escapeHtml() + '); return false;">'
674 + _("Transfer") + '</a>';
679 "data": function( row, type, val, meta ) {
682 if ( row.current_holds_count > 0 ) {
683 result += '<span class="button" title="'
684 + _("Can't cancel order, (%s) holds are linked with this order. Cancel holds first").format( row.holds_count.escapeHtml() ) + '">'
685 + _("Can't cancel order") + '</span><br/>';
688 result += '<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber='
689 + encodeURIComponent(row.order_id)
690 + '&biblionumber=' + encodeURIComponent(row.biblio_id)
691 + '&referrer=/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | uri %]">'
692 + _("Cancel order") + '</a><br/>';
695 if ( row.biblio != null ) {
696 if ( row.biblio.items_count - row.items.length > 0 ||
697 row.biblio.active_orders_count > 1 ||
698 row.biblio.subscriptions_count > 0 ||
699 row.biblio.holds_count > 0 ) { // biblio can be deleted
700 result += '<span class="button" title="'
701 + _("Can't delete catalog record, see constraints below") + '">'
702 + _("Can't cancel order and delete catalog record") + '</span><br>';
705 result += '<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber='
706 + encodeURIComponent(row.order_id) + '&biblionumber=' + encodeURIComponent(row.biblio_id)
707 + '&del_biblio=1&referrer="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[$ invoiceid | uri ]">'
708 + _("Cancel order and catalog record") + '</a><br/>';
711 if ( row.biblio.items_count - row.items.length > 0 ) {
712 result += '<strong title="'
713 + _("Can't delete catalog record, because of %s existing item(s)").format(row.items.length)
714 +'">' + (row.biblio.items_count - row.items.length) + _(" item(s) left") + '</strong><br/>';
717 if ( row.biblio.active_orders_count > 1 ) {
718 result += '<strong title="'
719 + _("Can't delete catalog record, delete other orders linked to it first") + '">'
720 + (row.biblio.active_orders_count - 1) + _(" order(s) left") + '</strong><br/>';
723 if ( row.biblio.subscriptions_count > 0 ) {
724 result += '<strong title="' + _("Can't delete catalog record, delete subscriptions first") + '">'
725 + _("%s subscription(s) left").format(row.biblio.subscriptions_count)
729 if ( row.biblio.holds_count > 0 ) {
730 result += '<strong title="' + _("Can't delete catalog record or order, cancel holds first") + '">'
731 + _("%s hold(s) left").format(row.biblio.holds_count) + '</strong>';
742 $("#filterform").on("submit", function(e) {
745 var summary = $("#summaryfilter").val();
746 var basket_name = $("#basketfilter").val();
747 var basket_group = $("#basketgroupnamefilter").val();
748 var order_id = $("#orderfilter").val();
749 var ean = $("#eanfilter").val();
751 // Save the filters in the cookie
752 $.cookie("filter_parcel_summary", summary);
753 $.cookie("filter_parcel_basketname", basket_name);
754 $.cookie("filter_parcel_orderno", basket_group);
755 $.cookie("filter_parcel_basketgroupname", order_id);
756 $.cookie("filter_parcel_ean", ean);
758 var query_params = query_from_filters(
762 "basket_name": basket_name,
763 "basket_group": basket_group,
764 "order_id": order_id,
765 "ean": (ean === undefined) ? '' : ean // ean == undefined if the HTML doens't have it
769 if ( query_params.length > 0 ) {
770 pending_orders_table.api().ajax.url( pending_orders_url + '&' + query_params.join("&") );
773 pending_orders_table.api().ajax.url( pending_orders_url + '&q=' + encodeURI(JSON.stringify(base_query)) );
775 pending_orders_table.api().ajax.reload( null, false );
778 $('#clear_form_filters').on("click", function(){
779 $(this).closest('form').find("input[type=text], textarea").val("");
780 pending_orders_table.api().ajax.url(pending_orders_url + '&q=' + encodeURI(JSON.stringify(base_query))).draw();
783 $(".previewData").on("click", function(e){
785 var ltitle = $(this).text();
786 var page = $(this).attr("href");
787 $("#dataPreviewLabel").text(ltitle);
788 $("#dataPreview .modal-body").load(page + " div");
789 $('#dataPreview').modal({show:true});
792 $("#dataPreview").on("hidden.bs.modal", function(){
793 $("#dataPreviewLabel").html("");
794 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
798 // Case-insensitive version of jquery's contains function
799 jQuery.extend(jQuery.expr[':'], {
800 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
803 // Contains exactly function
804 jQuery.extend(jQuery.expr[':'], {
805 containsExactly: "$(a).text() == m[3]"
808 function transfer_order_popup(ordernumber) {
809 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
810 + "ordernumber=" + ordernumber
811 window.open(url, 'TransferOrder');
816 [% INCLUDE 'intranet-bottom.inc' %]