From 7e0cd84bebb98f5da9cebc7805b9a325eb315f30 Mon Sep 17 00:00:00 2001 From: Maryse Simard Date: Fri, 18 Sep 2020 08:34:17 -0400 Subject: [PATCH] Bug 17015: When using book drop mode, set check in time as closing hours Signed-off-by: Michal Denar --- Koha/Checkouts.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/Checkouts.pm b/Koha/Checkouts.pm index 76a3b9e686..1872479ad7 100644 --- a/Koha/Checkouts.pm +++ b/Koha/Checkouts.pm @@ -55,9 +55,11 @@ sub calculate_dropbox_date { branchcode => $branchcode, } ); - my $calendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => $daysmode ); + my $calendar = Koha::DiscreteCalendar->new( branchcode => $branchcode, days_mode => $daysmode ); my $today = dt_from_string; my $dropbox_date = $calendar->addDuration( $today, -1 ); + my $dateInfo = $calendar->get_date_info($dropbox_date); + $dropbox_date = dt_from_string($dateInfo->{date} ." ". $dateInfo->{close_hour}, 'iso', C4::Context->tz()); return $dropbox_date; } -- 2.25.1