Fix overdue list if you do not specify a branchcode.
authorNahuel Angelinetti <nahuel.angelinetti@biblibre.com>
Thu, 30 Oct 2008 09:35:59 +0000 (10:35 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 12 Nov 2008 16:11:22 +0000 (17:11 +0100)
Before, if you do not provide a "branchcode" you have an empty csv export.
Now, if you have an empty branchcode you have all overdues listed in csv.
(I made a typo error in code)

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
circ/overdue.pl

index e8e280f..3797926 100755 (executable)
@@ -56,7 +56,8 @@ my $dbh = C4::Context->dbh;
 # download the complete CSV
 if ($op eq 'csv') {
 warn "BRANCH : $branchfilter";
-    my $csv = `../misc/cronjobs/overdue_notices.pl -csv -n -library $branchfilter`;
+    my $lib = $branchfilter ? "-library $branchfilter" :'';
+    my $csv = `../misc/cronjobs/overdue_notices.pl -csv -n $lib`;
     print $input->header(-type => 'application/vnd.sun.xml.calc',
                         -encoding    => 'utf-8',
                         -attachment=>"overdues.csv",