(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 <galen.charlton@liblime.com>
This commit is contained in:
Nahuel ANGELINETTI 2009-03-06 12:25:05 +01:00 committed by Galen Charlton
parent 4f2557e46e
commit aea15bca2a
1 changed files with 2 additions and 1 deletions

View File

@ -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";