Skip to content

Commit

Permalink
Merge pull request #468 from dlbptfs/PT40301087
Browse files Browse the repository at this point in the history
[#40301087] Differing hold expiration date between DB table and notice
  • Loading branch information
ctfliblime committed Jun 25, 2013
2 parents defd185 + b02c010 commit 2be628b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lib/C4/Letters.pm
Expand Up @@ -27,7 +27,6 @@ use C4::Log;
use C4::SMS;
use C4::Debug;
use C4::Dates qw/format_date/;
use Date::Calc qw( Add_Delta_Days );
use Encode;
use Carp;
use File::Temp qw/tempfile/;
Expand Down Expand Up @@ -529,19 +528,6 @@ sub parseletter {

my $values = $sth->fetchrow_hashref;

# 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();
}

# and get all fields from the table
if ($table ne 'items' ) {
my $columns = C4::Context->dbh->prepare("SHOW COLUMNS FROM $table");
Expand Down

0 comments on commit 2be628b

Please sign in to comment.