[Koha-patches] [Signed Offf] [PATCH] Bug 5098: Add csv headers in overdues

Chris Cormack chrisc at catalyst.net.nz
Fri May 13 00:38:02 CEST 2011


From: Julian Maurice <julian.maurice at biblibre.com>

Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
---
 misc/cronjobs/overdue_notices.pl |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index bc97ecb..698b878 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -584,10 +584,14 @@ END_SQL
                 local $, = "\f";    # pagebreak
                 print @output_chunks;
         }
+        # Generate the content of the csv with headers
+        my $content = join(";", qw(title name surname address1 address2 zipcode city email itemcount itemsinfo due_date issue_date)) . "\n";
+        $content .= join( "\n", @output_chunks );
+            
         my $attachment = {
             filename => defined $csvfilename ? 'attachment.csv' : 'attachment.txt',
             type => 'text/plain',
-            content => join( "\n", @output_chunks )
+            content => $content, 
         };
 
         my $letter = {
-- 
1.7.4.1



More information about the Koha-patches mailing list