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