Lines 523-539
sub parseletter {
Link Here
|
523 |
# TEMPORARY hack until the expirationdate column is added to reserves |
523 |
# TEMPORARY hack until the expirationdate column is added to reserves |
524 |
if ( $table eq 'reserves' && $values->{'waitingdate'} ) { |
524 |
if ( $table eq 'reserves' && $values->{'waitingdate'} ) { |
525 |
my @waitingdate = split /-/, $values->{'waitingdate'}; |
525 |
my @waitingdate = split /-/, $values->{'waitingdate'}; |
526 |
|
526 |
$values->{'expirationdate'} = Add_Delta_Days( @waitingdate, C4::Context->preference('ReservesMaxPickUpDelay') ); |
527 |
$values->{'expirationdate'} = C4::Dates->new( |
527 |
} |
528 |
sprintf( |
528 |
for my $datefield (grep {$_ =~/date/} keys %$values){ |
529 |
'%04d-%02d-%02d', |
529 |
# Format all date field in order to display date according to system |
530 |
Add_Delta_Days( @waitingdate, C4::Context->preference( 'ReservesMaxPickUpDelay' ) ) |
530 |
$values->{$datefield}=C4::Dates->new($values->{$datefield})->output(); |
531 |
), |
|
|
532 |
'iso' |
533 |
)->output(); |
534 |
} |
531 |
} |
535 |
|
|
|
536 |
|
537 |
# and get all fields from the table |
532 |
# and get all fields from the table |
538 |
my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table"); |
533 |
my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table"); |
539 |
$columns->execute; |
534 |
$columns->execute; |
540 |
- |
|
|