Lines 114-127
Link Here
|
114 |
</tbody> |
114 |
</tbody> |
115 |
</table> |
115 |
</table> |
116 |
[% IF CAN_user_acquisition_merge_invoices %] |
116 |
[% IF CAN_user_acquisition_merge_invoices %] |
117 |
<a class="btn btn-default submit merge" id="merge" href="#merge_invoices"><i class="fa fa-compress"></i> Merge selected invoices</a> |
|
|
118 |
[% IF tab == 'closed' %] |
117 |
[% IF tab == 'closed' %] |
119 |
<a class="btn btn-default" 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> |
118 |
<a class="btn btn-default merge" id="merge" href="#merge_invoices" data-table="closedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a> |
|
|
119 |
<a class="btn btn-default" id="open_sel" href="#reopen_selected" data-table="closedresultst" 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> |
120 |
[% ELSE %] |
120 |
[% ELSE %] |
121 |
<a class="btn btn-default" 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> |
121 |
<a class="btn btn-default merge" id="merge" href="#merge_invoices" data-status="openedresultst"><i class="fa fa-compress"></i> Merge selected invoices</a> |
|
|
122 |
<a class="btn btn-default" id="close_sel" href="#close_selected" data-table="openedresultst" 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> |
122 |
[% END %] |
123 |
[% END %] |
123 |
|
|
|
124 |
[% END %] <!-- invoices_table --> |
124 |
[% END %] <!-- invoices_table --> |
|
|
125 |
[% END %] |
125 |
<div id="invoicestabs" class="toptabs" style="clear:both;"> |
126 |
<div id="invoicestabs" class="toptabs" style="clear:both;"> |
126 |
<ul class="ui-tabs-nav"> |
127 |
<ul class="ui-tabs-nav"> |
127 |
<li><a href="#opened">Open invoices ([% openedinvoices.size || 0 | html %])</a></li> |
128 |
<li><a href="#opened">Open invoices ([% openedinvoices.size || 0 | html %])</a></li> |
Lines 187-193
Link Here
|
187 |
</fieldset> |
188 |
</fieldset> |
188 |
</form> |
189 |
</form> |
189 |
</div> |
190 |
</div> |
190 |
[% END %] |
|
|
191 |
[% ELSE %] |
191 |
[% ELSE %] |
192 |
<p>Sorry, but there are no results for your search.</p> |
192 |
<p>Sorry, but there are no results for your search.</p> |
193 |
<p>Search was: |
193 |
<p>Search was: |
Lines 384-392
Link Here
|
384 |
$('#open_sel,#close_sel').click(function () { |
384 |
$('#open_sel,#close_sel').click(function () { |
385 |
var referer = $(this).attr("data-referer"); |
385 |
var referer = $(this).attr("data-referer"); |
386 |
var op = $(this).attr("data-op"); |
386 |
var op = $(this).attr("data-op"); |
|
|
387 |
var table = $(this).data('table'); |
387 |
var invoice_link = "invoice.pl?op="+op; |
388 |
var invoice_link = "invoice.pl?op="+op; |
388 |
if ($('.select-invoice:checked').length) { |
389 |
if ($('#' + table + ' .select-invoice:checked').length) { |
389 |
$('.select-invoice:checked').each(function () { |
390 |
$('#' + table + ' .select-invoice:checked').each(function () { |
390 |
var row = $(this).parents('tr'); |
391 |
var row = $(this).parents('tr'); |
391 |
invoice_link = invoice_link + "&invoiceid="+$(row).attr('data-invoiceid'); |
392 |
invoice_link = invoice_link + "&invoiceid="+$(row).attr('data-invoiceid'); |
392 |
}); |
393 |
}); |
Lines 400-410
Link Here
|
400 |
var booksellerid; |
401 |
var booksellerid; |
401 |
var mismatch; |
402 |
var mismatch; |
402 |
var invoices = [ ]; |
403 |
var invoices = [ ]; |
403 |
if ($('.select-invoice:checked').size() < 2) { |
404 |
var table = $(this).data('table'); |
|
|
405 |
if ($('#' + table + ' .select-invoice:checked').size() < 2) { |
404 |
alert(_("You must select at least two invoices to merge.")); |
406 |
alert(_("You must select at least two invoices to merge.")); |
405 |
return false; |
407 |
return false; |
406 |
} |
408 |
} |
407 |
$('.select-invoice:checked').each(function () { |
409 |
$('#' + table + ' .select-invoice:checked').each(function () { |
408 |
var row = $(this).parents('tr'); |
410 |
var row = $(this).parents('tr'); |
409 |
booksellerid = booksellerid || $(row).attr('data-booksellerid'); |
411 |
booksellerid = booksellerid || $(row).attr('data-booksellerid'); |
410 |
if (booksellerid !== $(row).attr('data-booksellerid')) { |
412 |
if (booksellerid !== $(row).attr('data-booksellerid')) { |
411 |
- |
|
|