From 1b964211876e378fcc19e090a36499aae6198f30 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Nov 2012 10:35:08 +0100 Subject: [PATCH] [PASSED QA] Bug 7288: Allow to display only subscriptions in the invoices table This patch adds a checkbox "Show only subscriptions" in the invoices table. If this checkbox is checked, a filter is added on the table in order to show only subscription invoices Signed-off-by: Paola Rossi Signed-off-by: Katrin Fischer 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 Passes all tests and QA script. Also passes t/db_dependent/Acquisition.t and t/db_dependent/Acquisition/*. --- C4/Acquisition.pm | 1 + .../prog/en/modules/acqui/invoices.tt | 23 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 1bf41cb..9d8fe69 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2504,6 +2504,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 66b40a6..f3809f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -9,16 +9,27 @@