[Koha-patches] [PATCH] (bug #3011) csv export doesn't fill all the fields

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Fri Mar 6 11:29:34 CET 2009


This patch just fix the script which export to csv the overdue, and field the missing fields
---
 misc/cronjobs/overdue_notices.pl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index 7ae67a0..82c05c6 100755
--- a/misc/cronjobs/overdue_notices.pl
+++ b/misc/cronjobs/overdue_notices.pl
@@ -393,6 +393,8 @@ 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";
+                    warn Data::Dumper::Dumper($titles);
+                    $itemcount++;
                 }
                 $sth2->finish;
     
@@ -584,7 +586,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";
-- 
1.5.6.3




More information about the Koha-patches mailing list