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

(-)a/C4/HoldsQueue.pm (-2 / +6 lines)
Lines 397-402 sub MapItemsToHoldRequests { Link Here
397
          C4::Context->preference('LocalHoldsPriorityItemControl');
397
          C4::Context->preference('LocalHoldsPriorityItemControl');
398
398
399
        foreach my $request (@$hold_requests) {
399
        foreach my $request (@$hold_requests) {
400
            next if (defined($request->{itemnumber})); #skip item level holds in local priority checking
400
            last if $num_items_remaining == 0;
401
            last if $num_items_remaining == 0;
401
402
402
            my $local_hold_match;
403
            my $local_hold_match;
Lines 422-428 sub MapItemsToHoldRequests { Link Here
422
423
423
                if ($local_hold_match) {
424
                if ($local_hold_match) {
424
                    if ( exists $items_by_itemnumber{ $item->{itemnumber} }
425
                    if ( exists $items_by_itemnumber{ $item->{itemnumber} }
425
                        and not exists $allocated_items{ $item->{itemnumber} } )
426
                        and not exists $allocated_items{ $item->{itemnumber} }
427
                        and not $request->{allocated})
426
                    {
428
                    {
427
                        $item_map{ $item->{itemnumber} } = {
429
                        $item_map{ $item->{itemnumber} } = {
428
                            borrowernumber => $request->{borrowernumber},
430
                            borrowernumber => $request->{borrowernumber},
Lines 435-440 sub MapItemsToHoldRequests { Link Here
435
                            reservenotes => $request->{reservenotes},
437
                            reservenotes => $request->{reservenotes},
436
                        };
438
                        };
437
                        $allocated_items{ $item->{itemnumber} }++;
439
                        $allocated_items{ $item->{itemnumber} }++;
440
                        $request->{allocated} = 1;
438
                        $num_items_remaining--;
441
                        $num_items_remaining--;
439
                    }
442
                    }
440
                }
443
                }
Lines 444-449 sub MapItemsToHoldRequests { Link Here
444
447
445
    foreach my $request (@$hold_requests) {
448
    foreach my $request (@$hold_requests) {
446
        last if $num_items_remaining == 0;
449
        last if $num_items_remaining == 0;
450
        next if $request->{allocated};
447
451
448
        # is this an item-level request?
452
        # is this an item-level request?
449
        if (defined($request->{itemnumber})) {
453
        if (defined($request->{itemnumber})) {
Lines 494-499 sub MapItemsToHoldRequests { Link Here
494
    my $pull_branches;
498
    my $pull_branches;
495
    foreach my $request (@$hold_requests) {
499
    foreach my $request (@$hold_requests) {
496
        last if $num_items_remaining == 0;
500
        last if $num_items_remaining == 0;
501
        next if $request->{allocated};
497
        next if defined($request->{itemnumber}); # already handled these
502
        next if defined($request->{itemnumber}); # already handled these
498
503
499
        # look for local match first
504
        # look for local match first
500
- 

Return to bug 18001