@@ -, +, @@ data when HoldsQueueSkipClosed is enabled --- C4/HoldsQueue.pm | 5 ++++- admin/transport-cost-matrix.pl | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) --- a/C4/HoldsQueue.pm +++ a/C4/HoldsQueue.pm @@ -61,6 +61,9 @@ 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 => {} }); @@ -77,7 +80,7 @@ sub TransportCostMatrix { disable_transfer => $disabled }; - if ( C4::Context->preference("HoldsQueueSkipClosed") ) { + 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 ); --- a/admin/transport-cost-matrix.pl +++ a/admin/transport-cost-matrix.pl @@ -46,7 +46,7 @@ my $update = ( $input->param('op') // '' ) eq 'set-cost-matrix'; my ($cost_matrix, $have_matrix); unless ($update) { - $cost_matrix = TransportCostMatrix(); + $cost_matrix = TransportCostMatrix({ ignore_holds_queue_skip_closed => 1 }); $have_matrix = keys %$cost_matrix if $cost_matrix; } --