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

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Fri Mar 6 12:25:05 CET 2009


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

diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl
index 7ae67a0..23ce459 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";
-- 
1.5.6.3




More information about the Koha-patches mailing list