From 60cc17dcd500caade9b14aaa527cae7300e8832c Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 20 Sep 2010 06:47:43 +0200 Subject: [PATCH] Bug 6029 : Date processinghas to be done on all dates --- C4/Letters.pm | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 34e3686..fb956d2 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -523,17 +523,12 @@ sub parseletter { # TEMPORARY hack until the expirationdate column is added to reserves if ( $table eq 'reserves' && $values->{'waitingdate'} ) { my @waitingdate = split /-/, $values->{'waitingdate'}; - - $values->{'expirationdate'} = C4::Dates->new( - sprintf( - '%04d-%02d-%02d', - Add_Delta_Days( @waitingdate, C4::Context->preference( 'ReservesMaxPickUpDelay' ) ) - ), - 'iso' - )->output(); + $values->{'expirationdate'} = Add_Delta_Days( @waitingdate, C4::Context->preference('ReservesMaxPickUpDelay') ); + } + for my $datefield (grep {$_ =~/date/} keys %$values){ + # Format all date field in order to display date according to system + $values->{$datefield}=C4::Dates->new($values->{$datefield})->output(); } - - # and get all fields from the table my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table"); $columns->execute; -- 1.7.1