6 [% PROCESS 'i18n.inc' %]
8 [% INCLUDE 'doc-head-open.inc' %]
10 [% IF ( invoiceclosedate ) %]
11 Receipt summary for [% name | html %] [% IF ( invoice ) %]invoice [
12 % invoice | html %][% END %]
14 Receive orders from [% name | html %]
15 [% END %] › Acquisitions › Koha
17 [% INCLUDE 'doc-head-close.inc' %]
20 <body id="acq_parcel" class="acq">
21 [% WRAPPER 'header.inc' %]
22 [% INCLUDE 'acquisitions-search.inc' %]
25 [% WRAPPER 'sub-header.inc' %]
26 [% WRAPPER breadcrumbs %]
27 [% WRAPPER breadcrumb_item %]
28 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
30 [% IF invoiceclosedate %]
31 [% WRAPPER breadcrumb_item bc_active= 1 %]
33 <span>Receipt summary for <em>[% name | html %] [ [% invoice | html %] ]</em></span>
35 <span>Receipt summary for <em>[% name | html %]</em></span>
39 [% WRAPPER breadcrumb_item %]
40 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
42 [% WRAPPER breadcrumb_item bc_active= 1 %]
43 <span>Receive orders from [% name | html %]</span>
46 [% END #/ WRAPPER breadcrumbs %]
47 [% END #/ WRAPPER sub-header.inc %]
49 <div class="main container-fluid">
51 <div class="col-sm-10 col-sm-push-2">
54 [% IF ( receive_error ) %]
55 <div class="dialog alert">
56 <h3>Error adding items:</h3>
58 [% FOREACH error_loo IN error_loop %]
59 <li>[% error_loo.error_param | html %][% IF ( error_loo.error_duplicate_barcode ) %]Duplicate barcode[% END %] <!-- todo: other error conditions come here. --></li>
65 [% IF ( invoiceclosedate ) %]
66 <span>Receipt summary for <em>[% name | html %]</em></span> [% IF ( invoice ) %] <em> [ [% invoice | html %] ] </em>[% END %]
68 <span>Receive orders from [% name | html %]</span>
72 [% IF ( success_delorder ) %]
73 <div class="dialog message">The order has been successfully canceled.</div>
75 [% IF ( error_delitem ) %]
76 <div class="dialog alert">The order has been canceled, although one or more items could not have been deleted.</div>
78 [% IF ( error_delbiblio ) %]
79 <div class="dialog alert">The order has been canceled, although the record has not been deleted.</div>
83 [% IF (error_cancelling_receipt) %]
84 <div class="dialog alert">
85 <span>Cannot cancel receipt. Possible reasons:</span>
88 The order line you are trying to cancel was created from a partial receipt
89 of another order line which is already received. Try to cancel this
93 The order line you are trying to cancel was created from a partial receipt
94 of another order line which has been deleted. Cancellation is not
101 [% IF error_invoice_not_known %]
102 <div class="dialog alert">
103 The invoice referenced by this invoiceid does not exist.
107 [% UNLESS no_orders_to_display %]
108 <div id="acqui_receive_summary">
109 <p><strong>Invoice number:</strong> [% invoice | html %] <strong>Shipment date:</strong> [% shipmentdate | $KohaDates %]</p>
111 [% UNLESS (invoiceclosedate) %]
112 <div id="acqui_receive_search" class="page-section">
113 <h3>Pending orders</h3>
114 <table id="pending_orders" class="table table-bordered table-striped">
119 <th>Basket group</th>
123 <th>Replacement price</th>
133 <fieldset class="action">
134 <button id="select_multiple" class="btn btn-primary"></button>
139 <span>Invoice is closed, so you can't receive orders anymore.</span>
140 [% IF CAN_user_acquisition_reopen_closed_invoices %]
141 <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>.
146 <div id="acqui_receive_receivelist" class="page-section">
147 <h3>Already received</h3>
149 [% IF ( loop_received ) %]
150 <form action="/cgi-bin/koha/acqui/parcel.pl" method="get" name="orderform">
151 <table id="receivedt">
155 <th>Basket group</th>
157 <th title="Item holds / Total holds">Holds</th>
160 <th>Replacement price</th>
170 [% FOREACH key IN subtotal_for_funds.keys.sort %]
172 [% IF invoiceincgst %]
173 <td colspan="6" class="total">(Tax inc.)</td>
175 <td colspan="6" class="total">(Tax exc.)</td>
177 <td colspan="3"><em>Subtotal for</em> [% key | html %]</td>
178 <td>[% subtotal_for_funds.$key.ecost | $Price %]</td>
179 <td>[% subtotal_for_funds.$key.unitprice | $Price %]</td>
185 <th colspan="11" class="total">Total tax exc.</th>
186 <th>[% total_tax_excluded | $Price %]</th>
189 [% FOREACH book_foot IN book_foot_loop %]
191 <th colspan="11">Total (GST [% book_foot.tax_rate * 100 | html %]%)</th>
192 <th>[% book_foot.tax_value | $Price %]</th>
197 <th colspan="11" class="total">Total tax inc.</th>
198 <th>[% total_tax_included | $Price %]</th>
202 <tbody class="filterclass">
203 [% FOREACH order IN loop_received %]
205 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basketno | uri %]"> [% order.basketname | html %] ([% order.basketno | html %])</a></td>
207 [% IF order.basketgroupid %]
208 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]">[% order.basketgroupname | html %] ([% order.basketgroupid | html %])</a>
214 <a href="neworderempty.pl?ordernumber=[% order.ordernumber | uri %]&booksellerid=[% booksellerid | uri %]">[% order.ordernumber | html %]</a>
215 [% IF (order.parent_ordernumber && (order.parent_ordernumber != order.ordernumber)) %]
216 (<a href="neworderempty.pl?ordernumber=[% order.parent_ordernumber | uri %]&booksellerid=[% booksellerid | uri %]" title="Original order line">[% order.parent_ordernumber | html %]</a>)
220 [% IF order.total_holds > 0 %]
221 [% IF order.item_holds > 0 %]
222 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.item_holds | html %]</a></span>
227 <span class="error"><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% order.biblionumber | uri %]">[% order.total_holds | html %]</a></span>
233 [% INCLUDE 'biblio-title.inc' biblio=order link = 1 %]
234 [% IF ( order.author ) %] / [% order.author | html %][% END %]
235 [% IF ( order.isbn ) %] - [% order.isbn | html %][% END %]
236 [% IF ( order.publishercode ) %]
237 <br />Publisher: [% order.publishercode | html %]
238 [%- IF ( order.publicationyear > 0) -%], [% order.publicationyear | html %]
239 [%- ELSIF ( order.copyrightdate > 0) -%] [% order.copyrightdate | html %]
242 [% IF ( order.suggestionid ) %]
244 Suggested by: [% order.surnamesuggestedby | html %][% IF ( order.firstnamesuggestedby ) %], [% order.firstnamesuggestedby | html %] [% END %]
245 (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% order.suggestionid | uri %]&op=show">suggestion #[% order.suggestionid | html %]</a>)
248 [% IF ( order.order_internalnote ) %]
249 <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>
251 [<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>]
253 [% IF ( order.order_vendornote ) %]
254 <p class="ordernote"><strong>Vendor note: </strong>[% order.order_vendornote | html %]</p>
256 [<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>]
260 <a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=[% order.ordernumber | uri %]" class="previewData">[% tp('noun', 'Order') | html %]</a><br>
261 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | uri %]" class="previewData">MARC</a><br>
262 <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber | uri %]" class="previewData">Card</a>
264 <td>[% order.replacementprice | $Price %]</td>
265 <td>[% order.quantityreceived | html %]</td>
266 <td>[% order.budget.budget_name | html %]</td>
267 <td>[% order.ecost | $Price %]</td>
268 <td>[% order.unitprice | $Price %]</td>
269 <td>[% order.total | $Price %]</td>
271 [% IF loop_receive.cannot_cancel or ( order.basket.effective_create_items == "receiving" and loop_receive.holds > 0 ) %]
272 [% IF loop_receive.cannot_cancel %]
273 [% span_title = BLOCK %]
274 <span>Cannot cancel receipt of this order line because it
275 was created from a partial receipt of order line no.
276 [% order.parent_ordernumber | html %], which is
277 already received. Try cancelling this one first and
281 [%# FIXME Here we block the cancellation if holds exist. Actually it could be possible if items will be exist after the deletion %]
282 [%# Some additional checks should be added in the pl file %]
283 [% span_title = BLOCK %]
284 <span>Cannot cancel receipt of this order line because at least one hold exists on the records.</span>
287 <span title="[% span_title | collapse | html %]">
291 <a href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | uri %]&op=cancelreceipt&ordernumber=[% order.ordernumber | uri %]">Cancel receipt</a>
300 [% ELSE %]There are no received orders.[% END %]
303 <div class="modal" id="dataPreview" tabindex="-1" role="dialog" aria-labelledby="dataPreviewLabel">
304 <div class="modal-dialog modal-wide" role="document">
305 <div class="modal-content">
306 <div class="modal-header">
307 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
308 <h3 id="dataPreviewLabel">MARC previews</h3>
310 <div class="modal-body">
311 <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
313 <div class="modal-footer">
314 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
316 </div> <!-- /.modal-content -->
317 </div> <!-- /.modal-dialog -->
318 </div> <!-- /.modal -->
320 [% IF (invoiceclosedate) %]
321 <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoiceid | uri %]">View invoice</a>
323 <form action="/cgi-bin/koha/acqui/invoice.pl" method="get">
324 <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
325 <fieldset class="action">
326 <input type="submit" class="btn btn-primary" value="Finish receiving" />
334 </div> <!-- /.col-sm-10.col-sm-push-2 -->
336 <div class="col-sm-2 col-sm-pull-10">
339 [% INCLUDE 'acquisitions-menu.inc' %]
341 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
342 </div> <!-- /.row -->
344 [% MACRO jsinclude BLOCK %]
345 [% Asset.js("js/acquisitions-menu.js") | $raw %]
346 [% INCLUDE 'datatables.inc' %]
347 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
348 <style>fieldset.action { margin-bottom: 20px }</style>
350 dt_overwrite_html_sorting_localeCompare();
351 var PENDING_MULTI_SELECTION = _("Receive selected (%s)");
352 var columns_filter = {};
354 $(document).ready(function(){
356 if ( $("#receivedt").length ) {
357 var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
359 "iDisplayLength": 10,
360 "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
362 { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
368 { "sType": "num-html" },
369 { "sType": "anti-the" },
379 "sPaginationType": "full"
385 "url": '/api/v1/acquisitions/orders?only_active=1'
388 "basket.basket_group",
389 "biblio.active_orders+count",
390 "biblio.holds+count",
391 "biblio.items+count",
392 "biblio.suggestions.suggester",
394 "current_item_level_holds+count",
397 "stateSave": true, // remember state on page reload
398 "drawCallback": function (settings) {
399 $(".previewData").on("click", function(e){
401 var ltitle = $(this).text();
402 var page = $(this).attr("href");
403 $("#dataPreviewLabel").text(ltitle);
404 $("#dataPreview .modal-body").load(page + " div");
405 $('#dataPreview').modal({show:true});
409 { "data": "basket.name",
412 "render": function(data, type, row, meta) {
413 if (type != 'display') return escape_str(data);
414 return "<a href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + encodeURIComponent(row.basket.basket_id) + "\">" + escape_str(data) + " (" + escape_str(row.basket.basket_id) + ")</a>";
417 { "data": "basket.basket_group.name",
419 "render": function(data, type, row, meta) {
420 if ( type != 'display' ) {
421 return escape_str(data);
423 if ( row.basket.basket_group_id == null ) {
424 return _("No basket group");
427 return "<a href=\"/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid="
428 + encodeURIComponent(row.basket.vendor_id) + "&basketgroupid="
429 + encodeURIComponent(row.basket.basket_group_id) + "\">"
430 + escape_str(row.basket.basket_group.name) + " (" + escape_str(row.basket.basket_group_id) + ")</a>";
436 "render": function(data, type, row, meta) {
437 if (type != 'display') return escape_str(data);
438 return "<a href=\"neworderempty.pl?ordernumber="+encodeURIComponent(data)+"&booksellerid="+encodeURIComponent(row.basket.vendor_id)+"\">"+escape_str(data)+"</a>";
442 [% SET summary_fields = "biblio.title:biblio.author:biblio.isbn:biblio.publisher:me.internal_note:me.vendor_note" %]
443 [% IF Koha.Preference('marcflavour')=='UNIMARC' %][% SET summary_fields = summary_fields _ ":biblio.ean" %][% END %]
444 "data": "[% summary_fields | html %]",
445 "render": function(data, type, row, meta) {
447 if ( row && row.biblio_id != null ) {
448 result = "<p><a href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber="+encodeURIComponent(row.biblio_id)+"\">"+escape_str(row.biblio.title)+"</a>";
449 if ( row.biblio.author != null )
450 result += _(" by ") + escape_str(row.biblio.author);
451 if ( row.biblio.isbn != null )
452 result += " – " + escape_str(row.biblio.isbn);
453 [% IF Koha.Preference('marcflavour')=='UNIMARC' %]
454 if ( row.biblio.ean != null )
455 result += " – EAN:" + escape_str(row.biblio.ean);
457 if ( row.biblio.publisher != null ) {
458 result += "<br/>" + _("Publisher: ") + escape_str(row.biblio.publisher);
459 if ( row.biblio.publication_year != null ) {
460 result += ", " + escape_str(row.biblio.publication_year);
462 else if ( row.biblio.copyright_date != null ) {
463 result += escape_str(row.biblio.copyright_date);
466 var suggestions = row.biblio.suggestions;
467 if ( suggestions != null && suggestions.length > 0 ) {
468 var suggestion = suggestions[0];
469 if ( suggestion.suggester != null ) {
470 var suggester = suggestion.suggester;
471 var suggested_by = [];
472 if ( suggester.surname != null ) {
473 suggested_by.push(escape_str(suggester.surname));
475 if ( suggester.firstname != null ) {
476 suggested_by.push(escape_str(suggester.firstname));
479 result += "<br/>" + _("Suggested by: ") +
480 '<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid='
481 + encodeURIComponent(suggestion.suggestionid)
483 + suggested_by.join(", ")
484 + " (#" + escape_str(suggestions[0].suggestionid) + ")</a>"; // FIXME: could be changed if we allow matching multiple suggestions
490 var internal_note = row.internal_note;
491 if ( internal_note != null && internal_note != '' ) {
492 result += '<p class="ordernote"><strong>'
493 + _("Internal note: ")
494 + '</strong>' + escape_str(internal_note)
495 + ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
496 + encodeURIComponent(row.order_id) + '&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
497 + '&type=internal">' + _("Change internal note") + '</a>]</p>';
500 result += ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
501 + encodeURIComponent(row.order_id) + '&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
502 + '&type=internal">' + _("Add internal note") + '</a>]';
505 var vendor_note = row.vendor_note;
506 if ( vendor_note != null && vendor_note != '' ) {
507 result += '<p class="ordernote"><strong>'
509 + '</strong>' + escape_str(vendor_note) + '</p>';
512 result += ' [<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber='
513 + encodeURIComponent(row.order_id) + '&referrer=/cgi-bin/koha/acqui/parcel.pl%3Finvoiceid=[% invoiceid | uri %]'
514 + '&type=vendor">' + _("Add vendor note") + '</a>]';
523 "render": function(data, type, row, meta) {
524 var result = '<div class="btn-group dropup">';
525 result += '<button id="view' + row.order_id + '" type="button" class="btn btn-default btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">';
526 result += ' <i class="fa-solid fa-eye aria-hidden="true"></i> ' + _("View");
527 result += ' <span class="caret"></span> ';
528 result += '</button>';
529 result += '<ul class="dropdown-menu" aria-labelledby="view' + row.order_id + '">';
530 result += '<li><a href="/cgi-bin/koha/acqui/showorder.pl?ordernumber=' + encodeURIComponent(row.order_id) + '" class="previewData">' + _("Order") + '</a></li>';
531 result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("MARC") + '</a></li>';
532 result += '<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=' + encodeURIComponent(row.biblio_id) + '" class="previewData">' + _("Card") + '</a></li>';
541 "data": "replacement_price",
542 "render": function(data, type, row, meta) {
543 return escape_price(row.replacement_price);
552 "render": function(data, type, row, meta) {
553 return escape_price(row.ecost);
558 "render": function(data, type, row, meta) {
559 return escape_price(row.quantity * row.ecost);
561 "orderable": false, // FIXME: How can we do it in DBIC?
566 "render": function(data, type, row, meta) {
567 if (type != 'display') return escape_str(data);
568 return escape_str(row.fund.name);
573 "render": function(data, type, row, meta) {
574 return '<a href="orderreceive.pl?multiple_orders='
575 + encodeURIComponent(row.order_id) + '&invoiceid=[% invoiceid | uri %]' + '">'
576 + _("Receive") + '</a><br/>'
577 + '<a href="#" onclick="transfer_order_popup(' + escape_str(row.order_id) + '); return false;">'
578 + _("Transfer") + '</a>';
585 "render": function(data, type, row, meta) {
588 if ( row.current_holds_count > 0 ) {
589 result += '<span class="button" title="'
590 + _("Can't cancel order, (%s) holds are linked with this order. Cancel holds first").format( escape_str(row.holds_count) ) + '">'
591 + _("Can't cancel order") + '</span><br/>';
594 result += '<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber='
595 + encodeURIComponent(row.order_id)
596 + '&biblionumber=' + encodeURIComponent(row.biblio_id)
597 + '&referrer=/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | uri %]">'
598 + _("Cancel order") + '</a><br/>';
601 if ( row.biblio != null ) {
602 if ( row.biblio.items_count - row.items.length > 0 ||
603 row.biblio.active_orders_count > 1 ||
604 row.biblio.subscriptions_count > 0 ||
605 row.biblio.holds_count > 0 ) { // biblio can be deleted
606 result += '<span class="button" title="'
607 + _("Can't delete catalog record, see constraints below") + '">'
608 + _("Can't cancel order and delete catalog record") + '</span><br>';
611 result += '<a href="/cgi-bin/koha/acqui/cancelorder.pl?ordernumber='
612 + encodeURIComponent(row.order_id) + '&biblionumber=' + encodeURIComponent(row.biblio_id)
613 + '&del_biblio=1&referrer="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[$ invoiceid | uri ]">'
614 + _("Cancel order and catalog record") + '</a><br/>';
617 if ( row.biblio.items_count - row.items.length > 0 ) {
618 result += '<strong title="'
619 + _("Can't delete catalog record, because of %s existing item(s)").format(row.items.length)
620 +'">' + (row.biblio.items_count - row.items.length) + _(" item(s) left") + '</strong><br/>';
623 if ( row.biblio.active_orders_count > 1 ) {
624 result += '<strong title="'
625 + _("Can't delete catalog record, delete other orders linked to it first") + '">'
626 + (row.biblio.active_orders_count - 1) + _(" order(s) left") + '</strong><br/>';
629 if ( row.biblio.subscriptions_count > 0 ) {
630 result += '<strong title="' + _("Can't delete catalog record, delete subscriptions first") + '">'
631 + _("%s subscription(s) left").format(row.biblio.subscriptions_count)
635 if ( row.biblio.holds_count > 0 ) {
636 result += '<strong title="' + _("Can't delete catalog record or order, cancel holds first") + '">'
637 + _("%s hold(s) left").format(row.biblio.holds_count) + '</strong>';
649 var selected_rows = {};
650 $('#select_multiple').click(function () {
651 var ids = Object.keys(selected_rows);
652 if (!ids.length) return;
653 location.href = 'orderreceive.pl?multiple_orders=' + ids.join(',') + '&invoiceid=[% invoiceid | uri %]';
654 }).html(PENDING_MULTI_SELECTION.format('0'))
655 options.order = [[1, 'asc']];
656 options.columns.unshift({
657 "data": function (row, type, val, meta) {
658 return '<input type="checkbox" class="selOrder" />';
664 var pending_orders_table = $("#pending_orders").kohaTable(options, {}, 1, { "basket.vendor_id": [% booksellerid | html %] });
666 var api = pending_orders_table.api();
667 api.on('draw', function () {
668 api.rows().every(function () {
670 var data = row.data();
671 $('.selOrder', row.node()).on('click', function (event) {
672 if ($(this).prop('checked')) {
673 selected_rows[data.order_id] = data;
675 delete selected_rows[data.order_id];
677 $('#select_multiple').html(PENDING_MULTI_SELECTION.format(Object.keys(selected_rows).length));
679 if (selected_rows[data.order_id]) {
680 $('.selOrder', row.node()).prop('checked', true);
686 $(".previewData").on("click", function(e){
688 var ltitle = $(this).text();
689 var page = $(this).attr("href");
690 $("#dataPreviewLabel").text(ltitle);
691 $("#dataPreview .modal-body").load(page + " div");
692 $('#dataPreview').modal("show");
695 $("#dataPreview").on("hidden.bs.modal", function(){
696 $("#dataPreviewLabel").html("");
697 $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
701 // Case-insensitive version of jquery's contains function
702 jQuery.extend(jQuery.expr[':'], {
703 icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
706 // Contains exactly function
707 jQuery.extend(jQuery.expr[':'], {
708 containsExactly: "$(a).text() == m[3]"
711 function transfer_order_popup(ordernumber) {
712 var url = "/cgi-bin/koha/acqui/transferorder.pl?"
713 + "ordernumber=" + ordernumber
714 window.open(url, 'TransferOrder');
719 [% INCLUDE 'intranet-bottom.inc' %]