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