From f205bbc38435a2fe76f2f976720040000987ccfa 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. --- circ/overdue.pl | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/circ/overdue.pl b/circ/overdue.pl index e59961a..4bdff13 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.4.1