From 2b54c10640223e156021e03f7bb6dfd7519c6a8c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 28 Apr 2015 16:10:05 +0200 Subject: [PATCH] Bug 12204: Display the expiration date on RESERVESLIP If an expiration date is set on placing an item on hold, the date is not displayed on the reserve slip. It's only generated/displayed if the prefs ExpireReservesMaxPickUpDelay and ReservesMaxPickUpDelay are set. Test plan: 1/ Define RESERVESLIP with, at least, Hold until: <> 2/ Place an item on hold and define an expiration date 3/ Check the item in and print the slip 4/ Note that the expiration date is correctly displayed --- C4/Letters.pm | 6 ++++-- C4/Reserves.pm | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 0faa91e..17ff9a0 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -783,8 +783,10 @@ sub _parseletter { if ( $table eq 'reserves' && $values->{'waitingdate'} ) { my @waitingdate = split /-/, $values->{'waitingdate'}; - $values->{'expirationdate'} = ''; - if( C4::Context->preference('ExpireReservesMaxPickUpDelay') && + if ( $values->{expirationdate} ) { + $values->{expirationdate} = output_pref({ dt => dt_from_string( $values->{expirationdate} ), dateonly => 1 }); + } + elsif( C4::Context->preference('ExpireReservesMaxPickUpDelay') && C4::Context->preference('ReservesMaxPickUpDelay') ) { my $dt = dt_from_string(); $dt->add( days => C4::Context->preference('ReservesMaxPickUpDelay') ); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 5874260..8648e02 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1471,6 +1471,7 @@ sub GetReserveInfo { reserves.biblionumber, reserves.branchcode, reserves.waitingdate, + reserves.expirationdate, notificationdate, reminderdate, priority, -- 2.1.0