Lines 27-33
Link Here
|
27 |
<input type="checkbox" style="vertical-align: middle;" id="show_only_subscription" /> |
27 |
<input type="checkbox" style="vertical-align: middle;" id="show_only_subscription" /> |
28 |
Show only subscriptions |
28 |
Show only subscriptions |
29 |
</label> |
29 |
</label> |
30 |
<table id="resultst"> |
30 |
[% BLOCK invoices_table %] |
|
|
31 |
[% IF closed %] |
32 |
[% SET tab = 'closed' %] |
33 |
[% ELSE %] |
34 |
[% SET tab = 'opened' %] |
35 |
[% END %] |
36 |
<table id="[% tab %]resultst" class="result"> |
31 |
<thead> |
37 |
<thead> |
32 |
<tr> |
38 |
<tr> |
33 |
<th> </th> |
39 |
<th> </th> |
Lines 95-101
Link Here
|
95 |
[% END %] |
101 |
[% END %] |
96 |
</tbody> |
102 |
</tbody> |
97 |
</table> |
103 |
</table> |
98 |
<a class="submit" id="merge" href="#merge_invoices">Merge selected invoices</a> |
104 |
<a class="submit merge" id="merge" href="#merge_invoices">Merge selected invoices</a> |
|
|
105 |
[% IF tab == 'closed' %] |
106 |
<a class="submit" id="open_sel" href="#reopen_selected" data-op="reopen" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-refresh"></i> Reopen Selected Invoices</a> |
107 |
[% ELSE %] |
108 |
<a class="submit" id="close_sel" href="#close_selected" data-op="close" data-referer="referer=/cgi-bin/koha/acqui/invoices.pl%3Fop=do_search%26invoicenumber=[% invoicenumber | uri %]%26supplier=[% booksellerid | uri %]%26shipmentdatefrom=[% shipmentdatefrom | $KohaDates %]%26shipmentdateto=[% shipmentdateto | $KohaDates %]%26billingdatefrom=[% billingdatefrom | $KohaDates %]%26billingdateto=[% billingdateto | $KohaDates %]%26isbneanissn=[% isbneanissn | uri %]%26title=[% title | uri %]%26author=[% author | uri %]%26publisher=[% publisher | uri %]%26publicationyear=[% publicationyear | uri %]%26branch=[% branch | uri %]"><i class="fa fa-times-circle"></i> Close Selected Invoices</a> |
109 |
[% END %] |
110 |
|
111 |
[% END %] <!-- invoices_table --> |
112 |
<div id="invoicestabs" class="toptabs" style="clear:both;"> |
113 |
<ul class="ui-tabs-nav"> |
114 |
<li><a href="#opened">Open Invoices ([% openedinvoices.size || 0 | html %])</a></li> |
115 |
<li><a href="#closed">Closed Invoices ([% closedinvoices.size || 0 | html %]) </a></li> |
116 |
</ul> |
117 |
<div id="opened"> |
118 |
[% IF openedinvoices %] |
119 |
[% INCLUDE invoices_table invoices = openedinvoices %] |
120 |
[% ELSE %] |
121 |
<div class="dialog message"> |
122 |
<p>Your search returned no open invoices.</p> |
123 |
</div> |
124 |
[% END %] |
125 |
</div> <!-- opened --> |
126 |
<div id="closed"> |
127 |
[% IF closedinvoices %] |
128 |
[% INCLUDE invoices_table invoices = closedinvoices closed = 1 %] |
129 |
[% ELSE %] |
130 |
<div class="dialog message"> |
131 |
<p>Your search returned no closed invoices.</p> |
132 |
</div> |
133 |
[% END %] |
134 |
</div> <!-- closed --> |
135 |
</div> <!-- invoicestabs --> |
136 |
|
137 |
|
99 |
<div id="merge_invoices"> |
138 |
<div id="merge_invoices"> |
100 |
<form id="merge_invoice_form" action="/cgi-bin/koha/acqui/invoice.pl" method="post"> |
139 |
<form id="merge_invoice_form" action="/cgi-bin/koha/acqui/invoice.pl" method="post"> |
101 |
<fieldset class="rows"> |
140 |
<fieldset class="rows"> |
Lines 300-312
Link Here
|
300 |
[% MACRO jsinclude BLOCK %] |
339 |
[% MACRO jsinclude BLOCK %] |
301 |
[% Asset.js("js/acquisitions-menu.js") | $raw %] |
340 |
[% Asset.js("js/acquisitions-menu.js") | $raw %] |
302 |
[% INCLUDE 'datatables.inc' %] |
341 |
[% INCLUDE 'datatables.inc' %] |
|
|
342 |
[% Asset.js("lib/jquery/plugins/dataTables.fnFilterAll.js") | $raw %] |
303 |
[% INCLUDE 'calendar.inc' %] |
343 |
[% INCLUDE 'calendar.inc' %] |
304 |
<script> |
344 |
<script> |
305 |
$(document).ready(function() { |
345 |
$(document).ready(function() { |
|
|
346 |
$('#invoicestabs').tabs(); |
306 |
$(".delete_invoice").click(function(){ |
347 |
$(".delete_invoice").click(function(){ |
307 |
return confirmDelete(_("Are you sure you want to delete this invoice?")); |
348 |
return confirmDelete(_("Are you sure you want to delete this invoice?")); |
308 |
}); |
349 |
}); |
309 |
var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { |
350 |
var resultst = $("table.result").dataTable($.extend(true, {}, dataTablesDefaults, { |
310 |
bPaginate: false, |
351 |
bPaginate: false, |
311 |
aoColumnDefs: [ |
352 |
aoColumnDefs: [ |
312 |
{ "bSortable": false, "aTargets": [1, -1] }, |
353 |
{ "bSortable": false, "aTargets": [1, -1] }, |
Lines 319-331
Link Here
|
319 |
|
360 |
|
320 |
$("#show_only_subscription").click(function(){ |
361 |
$("#show_only_subscription").click(function(){ |
321 |
if ( $(this).prop("checked") ) { |
362 |
if ( $(this).prop("checked") ) { |
322 |
resultst.fnFilter( "1", 0, true ); |
363 |
resultst.fnFilterAll( "1", 0, true ); |
323 |
} else { |
364 |
} else { |
324 |
resultst.fnFilter( '', 0 ); |
365 |
resultst.fnFilterAll( '', 0 ); |
325 |
} |
366 |
} |
326 |
}); |
367 |
}); |
327 |
|
368 |
|
328 |
$('#merge').click(function (ev) { |
369 |
$('#open_sel,#close_sel').click(function () { |
|
|
370 |
var referer = $(this).attr("data-referer"); |
371 |
var op = $(this).attr("data-op"); |
372 |
var invoice_link = "invoice.pl?op="+op; |
373 |
$('.select-invoice:checked').each(function () { |
374 |
var row = $(this).parents('tr'); |
375 |
invoice_link = invoice_link + "&invoiceid="+$(row).attr('data-invoiceid'); |
376 |
}); |
377 |
window.location.href =invoice_link +"&"+referer; |
378 |
}); |
379 |
|
380 |
$('.merge').click(function (ev) { |
329 |
var booksellerid; |
381 |
var booksellerid; |
330 |
var mismatch; |
382 |
var mismatch; |
331 |
var invoices = [ ]; |
383 |
var invoices = [ ]; |
332 |
- |
|
|