From 8b70875244b4e66a291bd21c99dbe8694f9219af Mon Sep 17 00:00:00 2001 From: simith Date: Thu, 31 Jul 2014 09:29:17 -0400 Subject: [PATCH] Bug 8687 - Improvements in overdue_notices.pl Improvements in the overdue_notices.pl script --- misc/cronjobs/overdue_notices.pl | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 943c486..8c7d809 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -378,7 +378,7 @@ if ( defined $csvfilename ) { } else { open $csv_fh, ">", $csvfilename or die "unable to open $csvfilename: $!"; } - if ( $csv->combine(qw(name surname address1 address2 zipcode city country email itemcount itemsinfo)) ) { + if ( $csv->combine(qw(name surname address1 address2 zipcode city country email phone cardnumber itemcount itemsinfo branchname letternumber)) ) { print $csv_fh $csv->string, "\n"; } else { $verbose and warn 'combine failed on argument: ' . $csv->error_input; @@ -392,11 +392,12 @@ if ( defined $htmlfilename ) { $fh = *STDOUT; } else { my $today = DateTime->now(time_zone => C4::Context->tz ); - open $fh, ">",File::Spec->catdir ($htmlfilename,"notices-".$today->ymd().".html"); + open $fh, ">:encoding(UTF-8)",File::Spec->catdir ($htmlfilename,"notices-".$today->ymd().".html"); } print $fh "\n"; print $fh "\n"; + print $fh "\n"; print $fh "