[Patches] [PATCH] Bug 7266: flags debarred, suspended, gonenoaddress in overdue

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Wed Dec 21 03:13:10 NZDT 2011


From: Adrien Saurat <adrien.saurat at biblibre.com>
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




More information about the Patches mailing list