@@ -, +, @@ --- C4/HoldsQueue.pm | 10 +++++----- t/db_dependent/HoldsQueue.t | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) --- a/C4/HoldsQueue.pm +++ a/C4/HoldsQueue.pm @@ -30,7 +30,7 @@ use C4::Circulation; use C4::Members; use C4::Biblio; use C4::Dates qw/format_date/; -use C4::Calendar; +use Koha::Calendar; use Koha::Database; use Koha::DateUtils; @@ -81,9 +81,9 @@ sub TransportCostMatrix { }; if ( C4::Context->preference("HoldsQueueSkipClosed") ) { - $calendars->{$from} ||= C4::Calendar->new( branchcode => $from ); + $calendars->{$from} ||= Koha::Calendar->new( branchcode => $from ); $transport_cost_matrix{$to}{$from}{disable_transfer} ||= - $calendars->{$from}->isHoliday( $today->day(), $today->month(), $today->year() ); + $calendars->{$from}->is_holiday( $today ); } } @@ -614,8 +614,8 @@ sub load_branches_to_pull_from { my $today = dt_from_string(); if ( C4::Context->preference('HoldsQueueSkipClosed') ) { @branches_to_use = grep { - !C4::Calendar->new( branchcode => $_ ) - ->isHoliday( $today->day(), $today->month(), $today->year() ) + !Koha::Calendar->new( branchcode => $_ ) + ->is_holiday( $today ) } @branches_to_use; } --- a/t/db_dependent/HoldsQueue.t +++ a/t/db_dependent/HoldsQueue.t @@ -11,6 +11,7 @@ use Modern::Perl; use Test::More tests => 23; use Data::Dumper; +use C4::Calendar; use C4::Context; use C4::Branch; use C4::ItemType; --