From 5d25babe2a116fbfd92c876eb1e6d5bf1d4d6426 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 --- circ/overdue.pl | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index e59961a..a7207b7 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; -- 1.7.5.4