Lines 61-66
Returns Transport Cost Matrix as a hashref <to branch code> => <from branch code
Link Here
|
61 |
=cut |
61 |
=cut |
62 |
|
62 |
|
63 |
sub TransportCostMatrix { |
63 |
sub TransportCostMatrix { |
|
|
64 |
my ( $params ) = @_; |
65 |
my $ignore_holds_queue_skip_closed = $params->{ignore_holds_queue_skip_closed}; |
66 |
|
64 |
my $dbh = C4::Context->dbh; |
67 |
my $dbh = C4::Context->dbh; |
65 |
my $transport_costs = $dbh->selectall_arrayref("SELECT * FROM transport_cost",{ Slice => {} }); |
68 |
my $transport_costs = $dbh->selectall_arrayref("SELECT * FROM transport_cost",{ Slice => {} }); |
66 |
|
69 |
|
Lines 77-83
sub TransportCostMatrix {
Link Here
|
77 |
disable_transfer => $disabled |
80 |
disable_transfer => $disabled |
78 |
}; |
81 |
}; |
79 |
|
82 |
|
80 |
if ( C4::Context->preference("HoldsQueueSkipClosed") ) { |
83 |
if ( !$ignore_holds_queue_skip_closed && C4::Context->preference("HoldsQueueSkipClosed") ) { |
81 |
$calendars->{$from} ||= Koha::Calendar->new( branchcode => $from ); |
84 |
$calendars->{$from} ||= Koha::Calendar->new( branchcode => $from ); |
82 |
$transport_cost_matrix{$to}{$from}{disable_transfer} ||= |
85 |
$transport_cost_matrix{$to}{$from}{disable_transfer} ||= |
83 |
$calendars->{$from}->is_holiday( $today ); |
86 |
$calendars->{$from}->is_holiday( $today ); |