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

(-)a/C4/HoldsQueue.pm (-3 / +2 lines)
Lines 434-440 sub MapItemsToHoldRequests { Link Here
434
                }
434
                }
435
            }
435
            }
436
            $holdingbranch = $pickup_branch;
436
            $holdingbranch = $pickup_branch;
437
            $itemnumber ||= $holding_branch_items->[0]->{itemnumber};
438
        }
437
        }
439
        elsif ($transport_cost_matrix) {
438
        elsif ($transport_cost_matrix) {
440
            $pull_branches = [keys %items_by_branch];
439
            $pull_branches = [keys %items_by_branch];
Lines 469-474 sub MapItemsToHoldRequests { Link Here
469
                $holdingbranch ||= $branch;
468
                $holdingbranch ||= $branch;
470
                foreach my $item (@$holding_branch_items) {
469
                foreach my $item (@$holding_branch_items) {
471
                    next if $pickup_branch ne $item->{homebranch};
470
                    next if $pickup_branch ne $item->{homebranch};
471
                    next if ( $item->{holdallowed} == 1 && $item->{homebranch} ne $request->{borrowerbranch} );
472
472
473
                    $itemnumber = $item->{itemnumber};
473
                    $itemnumber = $item->{itemnumber};
474
                    $holdingbranch = $branch;
474
                    $holdingbranch = $branch;
Lines 478-484 sub MapItemsToHoldRequests { Link Here
478
478
479
            unless ( $itemnumber ) {
479
            unless ( $itemnumber ) {
480
                foreach my $current_item ( @{ $items_by_branch{$holdingbranch} } ) {
480
                foreach my $current_item ( @{ $items_by_branch{$holdingbranch} } ) {
481
                    if ( $holdingbranch && ( $current_item->{holdallowed} == 2 || $pickup_branch eq $current_item->{homebranch} ) ) {
481
                    if ( $holdingbranch && ( $current_item->{holdallowed} == 2 || $request->{borrowerbranch} eq $current_item->{homebranch} ) ) {
482
                        $itemnumber = $current_item->{itemnumber};
482
                        $itemnumber = $current_item->{itemnumber};
483
                        last; # quit this loop as soon as we have a suitable item
483
                        last; # quit this loop as soon as we have a suitable item
484
                    }
484
                    }
485
- 

Return to bug 11258