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

(-)a/C4/HoldsQueue.pm (-4 / +10 lines)
Lines 337-343 sub GetItemsAvailableToFillHoldRequestsForBib { Link Here
337
    my @items = grep { ! scalar GetTransfers($_->{itemnumber}) } @$itm;
337
    my @items = grep { ! scalar GetTransfers($_->{itemnumber}) } @$itm;
338
    return [ grep {
338
    return [ grep {
339
        my $rule = GetBranchItemRule($_->{homebranch}, $_->{itype});
339
        my $rule = GetBranchItemRule($_->{homebranch}, $_->{itype});
340
        $_->{holdallowed} = $rule->{holdallowed} != 0
340
        $_->{holdallowed} = $rule->{holdallowed};
341
    } @items ];
341
    } @items ];
342
}
342
}
343
343
Lines 470-477 sub MapItemsToHoldRequests { Link Here
470
                    last PULL_BRANCHES;
470
                    last PULL_BRANCHES;
471
                }
471
                }
472
            }
472
            }
473
            $itemnumber ||= $items_by_branch{$holdingbranch}->[0]->{itemnumber}
473
474
              if $holdingbranch;
474
            unless ( $itemnumber ) {
475
                foreach my $current_item ( @{ $items_by_branch{$holdingbranch} } ) {
476
                    if ( $holdingbranch && ( $current_item->{holdallowed} == 2 || $pickup_branch eq $current_item->{homebranch} ) ) {
477
                        $itemnumber = $current_item->{itemnumber};
478
                        last; # quit this loop as soon as we have a suitable item
479
                    }
480
                }
481
            }
475
        }
482
        }
476
483
477
        if ($itemnumber) {
484
        if ($itemnumber) {
478
- 

Return to bug 10243