From 56cc843d257be4a99abb22e71154343536caab20 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 --- Koha/Checkouts.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/Checkouts.pm b/Koha/Checkouts.pm index 2ade76e20e..dbef4ae4a2 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->addDate( $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.17.1