From aea15bca2a7715dee7f1d35456e8fe650aed8bef Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 6 Mar 2009 12:25:05 +0100 Subject: [PATCH] (bug #3011) csv export doesn't fill all the fields This patch just fix the script which export to csv the overdue, and field the missing fields Signed-off-by: Galen Charlton --- misc/cronjobs/overdue_notices.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 7ae67a0888..23ce459aa8 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -393,6 +393,7 @@ END_SQL while ( my $item_info = $sth2->fetchrow_hashref() ) { my @item_info = map { $_ =~ /^date|date$/ ? format_date( $item_info->{$_} ) : $item_info->{$_} || '' } @item_content_fields; $titles .= join("\t", @item_info) . "\n"; + $itemcount++; } $sth2->finish; @@ -584,7 +585,7 @@ sub prepare_letter_for_printing { if ( exists $params->{'outputformat'} && $params->{'outputformat'} eq 'csv' ) { if ($csv->combine( $params->{'firstname'}, $params->{'lastname'}, $params->{'address1'}, $params->{'address2'}, $params->{'postcode'}, - $params->{'city'}, $params->{'email'}, $params->{'itemcount'}, $params->{'items.content'} + $params->{'city'}, $params->{'email'}, $params->{'itemcount'}, $params->{'titles'} ) ) { return $csv->string, "\n"; -- 2.39.5