From 368b29c7d9590f0d02f383098d83ef299a28629c Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 6 Aug 2010 10:19:40 +0200 Subject: [PATCH] (bug #5098) csv headers in overdues this add the csv column headers in mail sent to librarian. --- misc/cronjobs/overdue_notices.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index bbfc678ee0..752d2b10a2 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -509,10 +509,14 @@ END_SQL print @output_chunks; } } else { + # 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 = { -- 2.39.5