From 53c42f32e1badae8bf93cf3c3f95f40ab4a114b6 Mon Sep 17 00:00:00 2001 From: Adrien Saurat Date: Thu, 13 Dec 2012 10:13:19 +0100 Subject: [PATCH] Bug 8306: Patrons statistics, fix for patron activity choice The "inactive" for "patron activity" choice is now effective. Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall (cherry picked from commit 680e6ce7d1aa53e716ea9fdab9c67e621fb828e2) Signed-off-by: Katrin Fischer (cherry picked from commit 7e3ffc7f87b09c0b33c2f82ba04fee89e789c2d2) Signed-off-by: Julian Maurice --- reports/borrowers_stats.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index 607f9d1588..61502cfe33 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -422,7 +422,7 @@ sub calculate { } } $strcalc .= " AND borrowernumber in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "')" if ($activity eq 'active'); - $strcalc .= " AND borrowernumber not in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "')" if ($activity eq 'nonactive'); + $strcalc .= " AND borrowernumber not in (select distinct(borrowernumber) from old_issues where issuedate > '" . $newperioddate . "' AND borrowernumber IS NOT NULL)" if ($activity eq 'nonactive'); $strcalc .= " AND $status='1' " if ($status); $strcalc .= " GROUP BY "; -- 2.39.5