[Koha-patches] [PATCH] (bug #5164) fix csv in overdue notice

Chris Cormack chrisc at catalyst.net.nz
Fri Apr 1 00:01:00 CEST 2011


From: Nahuel ANGELINETTI <nahuel.angelinetti at biblibre.com>

This fix the csv export sent by email for empty lines.
---
 misc/cronjobs/overdue_notices.pl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index 3ef566a..c266c56 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -584,6 +584,8 @@ END_SQL
                 local $, = "\f";    # pagebreak
                 print @output_chunks;
         }
+        my $content = join(";", qw(title name surname address1 address2 zipcode city email itemcount itemsinfo due_date issue_date)) . "\n";
+        $content .= join( "\n", map { m/(.+)/ } @output_chunks );
         my $attachment = {
             filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt',
             type => 'text/plain',
-- 
1.7.1



More information about the Koha-patches mailing list