@@ -, +, @@ invoices table --- C4/Acquisition.pm | 1 + .../prog/en/modules/acqui/invoices.tt | 22 +++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) --- a/C4/Acquisition.pm +++ a/C4/Acquisition.pm @@ -2303,6 +2303,7 @@ sub GetInvoices { my $dbh = C4::Context->dbh; my $query = qq{ SELECT aqinvoices.*, aqbooksellers.name AS suppliername, + aqorders.subscriptionid, COUNT( DISTINCT IF( aqorders.datereceived IS NOT NULL, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -14,15 +14,25 @@ $(document).ready(function() { [% IF (dateformat == 'metric') %] dt_add_type_uk_date(); [% END %] - $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { + var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { bInfo: false, bPaginate: false, - bFilter: false, sDom: "t", aoColumnDefs: [ - { "bSortable": false, "aTargets": [6] } + { "aTargets": [-1], "bSortable": false, "bSearchable": false }, + { "aTargets": [0], "bSortable": false, "bSearchable": false, "bVisible": false }, ] })); + + $("#show_only_subscription").attr("checked", false); + + $("#show_only_subscription").click(function(){ + if ( $(this).attr("checked") ) { + resultst.fnFilter( "[0-9]+", 0, true ); + } else { + resultst.fnFilter( '', 0 ); + } + }); }); //]]> @@ -42,9 +52,14 @@ $(document).ready(function() {

Invoices

[% IF ( do_search ) %] [% IF invoices %] + + @@ -57,6 +72,7 @@ $(document).ready(function() { [% FOREACH invoice IN invoices %] +
Subscriptionid Invoice no. Vendor Billing date
[% invoice.subscriptionid %] [% invoice.invoicenumber %] [% invoice.suppliername %] --