partial fix for #2471, (overdue notice sent twice)
authorPaul POULAIN <paul.poulain@biblibre.com>
Tue, 5 Aug 2008 16:53:29 +0000 (18:53 +0200)
committerJoshua Ferraro <jmf@liblime.com>
Wed, 6 Aug 2008 19:49:44 +0000 (14:49 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Overdues.pm

index 0a720b8..e735ff9 100644 (file)
@@ -973,7 +973,7 @@ returns a list of branch codes for branches with overdue rules defined.
 
 sub GetBranchcodesWithOverdueRules {
     my $dbh               = C4::Context->dbh;
-    my $rqoverduebranches = $dbh->prepare("SELECT DISTINCT branchcode FROM overduerules WHERE delay1 IS NOT NULL");
+    my $rqoverduebranches = $dbh->prepare("SELECT DISTINCT branchcode FROM overduerules WHERE delay1 IS NOT NULL AND branchcode <> ''");
     $rqoverduebranches->execute;
     my @branches = map { shift @$_ } @{ $rqoverduebranches->fetchall_arrayref };
     $rqoverduebranches->finish;