Here we just want to get the value from the syspref, the circ rule does
not exist yet.
Signed-off-by: Simon Perry <simon.perry@itcarlow.ie>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
my $expirationdate = dt_from_string($hold->{waitingdate});
if ( C4::Context->preference("ExcludeHolidaysFromMaxPickUpDelay") ) {
- my $calendar = Koha::Calendar->new( branchcode => $hold->{branchcode} );
+ my $calendar = Koha::Calendar->new( branchcode => $hold->{branchcode}, days_mode => C4::Context->preference('useDaysMode') );
$expirationdate = $calendar->days_forward( $expirationdate, $max_pickup_delay );
} else {
$expirationdate->add( days => $max_pickup_delay );