View | Details | Raw Unified | Return to bug 28510
Collapse All | Expand All

(-)a/C4/HoldsQueue.pm (-8 / +1 lines)
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
(-)a/admin/transport-cost-matrix.pl (-2 / +1 lines)
Lines 41-47 my $update = ( $input->param('op') // '' ) eq 'set-cost-matrix'; Link Here
41
41
42
my ($cost_matrix, $have_matrix);
42
my ($cost_matrix, $have_matrix);
43
unless ($update) {
43
unless ($update) {
44
    $cost_matrix = TransportCostMatrix({ ignore_holds_queue_skip_closed => 1 });
44
    $cost_matrix = TransportCostMatrix();
45
    $have_matrix = keys %$cost_matrix if $cost_matrix;
45
    $have_matrix = keys %$cost_matrix if $cost_matrix;
46
}
46
}
47
47
48
- 

Return to bug 28510