Bug 8306: Patrons statistics, fix for patron activity choice
authorAdrien Saurat <adrien.saurat@biblibre.com>
Thu, 13 Dec 2012 09:13:19 +0000 (10:13 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 14 Feb 2017 14:11:04 +0000 (14:11 +0000)
The "inactive" for "patron activity" choice is now effective.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

reports/borrowers_stats.pl

index 795ca8e..9bdf37d 100755 (executable)
@@ -407,7 +407,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 ";