From 057b4ae129d460bd18fb81cf2685a29c2ab73d0b Mon Sep 17 00:00:00 2001 From: Adrien Saurat Date: Tue, 20 Dec 2011 09:33:47 +0100 Subject: [PATCH] Bug 7266: flags debarred, suspended, gonenoaddress in overdue This patch makes these flags functionnal. Signed-off-by: Chris Cormack Signed-off-by: Paul Poulain (cherry picked from commit 74984f5cf3f12fe96e6d4201016efd9ca582e8b6) Signed-off-by: Chris Nighswonger --- circ/overdue.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index e59961a302..a7207b711b 100755 --- a/circ/overdue.pl +++ b/circ/overdue.pl @@ -274,7 +274,15 @@ if ($noreport) { $strsth.=" AND biblioitems.itemtype = '" . $itemtypefilter . "' "; } } - $strsth.=" AND borrowers.flags = '" . $borflagsfilter . "' " if $borflagsfilter; + if ( $borflagsfilter eq 'gonenoaddress' ) { + $strsth .= " AND borrowers.gonenoaddress <> 0"; + } + elsif ( $borflagsfilter eq 'debarred' ) { + $strsth .= " AND borrowers.debarred >= CURDATE()" ; + } + elsif ( $borflagsfilter eq 'lost') { + $strsth .= " AND borrowers.lost <> 0"; + } $strsth.=" AND borrowers.branchcode = '" . $branchfilter . "' " if $branchfilter; $strsth.=" AND date_due < '" . $datedueto . "' " if $datedueto; $strsth.=" AND date_due > '" . $dateduefrom . "' " if $dateduefrom; -- 2.39.5