diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index e1ae3c4830..f35e1c3595 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -63,13 +63,11 @@ Returns Transport Cost Matrix as a hashref => {ignore_holds_queue_skip_closed}; my $dbh = C4::Context->dbh; my $transport_costs = $dbh->selectall_arrayref("SELECT * FROM transport_cost",{ Slice => {} }); my $today = dt_from_string(); - my $calendars; my %transport_cost_matrix; foreach (@$transport_costs) { my $from = $_->{frombranch}; @@ -80,14 +78,8 @@ sub TransportCostMatrix { cost => $cost, disable_transfer => $disabled }; - - if ( !$ignore_holds_queue_skip_closed && C4::Context->preference("HoldsQueueSkipClosed") ) { - $calendars->{$from} ||= Koha::Calendar->new( branchcode => $from ); - $transport_cost_matrix{$to}{$from}{disable_transfer} ||= - $calendars->{$from}->is_holiday( $today ); - } - } + return \%transport_cost_matrix; } diff --git a/admin/transport-cost-matrix.pl b/admin/transport-cost-matrix.pl index e28ee89b79..34f6ca7869 100755 --- a/admin/transport-cost-matrix.pl +++ b/admin/transport-cost-matrix.pl @@ -45,7 +45,7 @@ my $update = ( $input->param('op') // '' ) eq 'set-cost-matrix'; my ($cost_matrix, $have_matrix); unless ($update) { - $cost_matrix = TransportCostMatrix({ ignore_holds_queue_skip_closed => 1 }); + $cost_matrix = TransportCostMatrix(); $have_matrix = keys %$cost_matrix if $cost_matrix; }