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

(-)a/reserve/request.pl (-3 / +14 lines)
Lines 593-600 foreach my $biblionumber (@biblionumbers) { Link Here
593
                    # If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules
593
                    # If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules
594
                    # with the exception of itemAlreadyOnHold because, you know, the item is already on hold
594
                    # with the exception of itemAlreadyOnHold because, you know, the item is already on hold
595
                    if ( $can_item_be_reserved ne 'itemAlreadyOnHold' ) {
595
                    if ( $can_item_be_reserved ne 'itemAlreadyOnHold' ) {
596
                        $item->{override} = 1;
596
                        # Send the pickup locations count to the UI, the pickup locations will be pulled using the API
597
                        $num_override++;
597
                        my $pickup_locations = $item_object->pickup_locations({ patron => $patron });
598
                        $item->{pickup_locations_count} = $pickup_locations->count;
599
                        if ( $item->{pickup_locations_count} > 0 ) {
600
                            $item->{override} = 1;
601
                            $num_override++;
602
                            # pass the holding branch for use as default
603
                            my $default_pickup_location = $pickup_locations->search({ branchcode => $item->{holdingbranch} })->next;
604
                            $item->{default_pickup_location} = $default_pickup_location;
605
                        }
606
                        else {
607
                            $item->{available} = 0;
608
                            $item->{not_holdable} = "no_valid_pickup_location";
609
                        }
598
                    } else { $num_alreadyheld++ }
610
                    } else { $num_alreadyheld++ }
599
611
600
                    push( @available_itemtypes, $item->{itype} );
612
                    push( @available_itemtypes, $item->{itype} );
601
- 

Return to bug 28748