diff --git a/Koha/Checkouts.pm b/Koha/Checkouts.pm index 84d4253e72..1f33cb1d81 100644 --- a/Koha/Checkouts.pm +++ b/Koha/Checkouts.pm @@ -48,8 +48,15 @@ sub calculate_dropbox_date { my $userenv = C4::Context->userenv; my $branchcode = $userenv->{branch} // q{}; - my $calendar = Koha::Calendar->new( branchcode => $branchcode ); - my $today = dt_from_string(); + my $useDaysMode_value = Koha::CirculationRules->get_useDaysMode_effective_value( + { + categorycode => undef, + itemtype => undef, + branchcode => $branchcode, + } + ); + my $calendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => $useDaysMode_value ); + my $today = dt_from_string; my $dropbox_date = $calendar->addDate( $today, -1 ); return $dropbox_date;