From 56c73320677f51f3663a3b2495acb95f87103f14 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Nov 2012 10:35:08 +0100 Subject: [PATCH] Bug 7288: add filter on subscriptions in the invoices table This patch adds a checkbox "Show only subscriptions" in the invoices table. If this checkbox is checked, only invoices that contain at least one order linked to a subscription are displayed. To test: - Test in a database with multiple existing invoices - Create an order from a subscription, close basket, receive - Test that the result table of the invoice search shows the new checkbox and that it works correctly Signed-off-by: Paola Rossi Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- C4/Acquisition.pm | 1 + .../prog/en/modules/acqui/invoices.tt | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 4b69825a9f..c7d0951e06 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2579,6 +2579,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, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index b7d9399009..21625a5a21 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -9,7 +9,7 @@