Bug 8306: Patrons statistics, fix for patron activity choice

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>
This commit is contained in:
Adrien Saurat 2012-12-13 10:13:19 +01:00 committed by Kyle M Hall
parent 5c1daf010e
commit 680e6ce7d1

View file

@ -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 ";