Lines 615-622
foreach my $biblionumber (@biblionumbers) {
Link Here
|
615 |
# If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules |
615 |
# If AllowHoldPolicyOverride is set, it should override EVERY restriction, not just branch item rules |
616 |
# with the exception of itemAlreadyOnHold because, you know, the item is already on hold |
616 |
# with the exception of itemAlreadyOnHold because, you know, the item is already on hold |
617 |
if ( $can_item_be_reserved ne 'itemAlreadyOnHold' ) { |
617 |
if ( $can_item_be_reserved ne 'itemAlreadyOnHold' ) { |
618 |
$item->{override} = 1; |
618 |
# Send the pickup locations count to the UI, the pickup locations will be pulled using the API |
619 |
$num_override++; |
619 |
my $pickup_locations = $item_object->pickup_locations({ patron => $patron }); |
|
|
620 |
$item->{pickup_locations_count} = $pickup_locations->count; |
621 |
if ( $item->{pickup_locations_count} > 0 ) { |
622 |
$item->{override} = 1; |
623 |
$num_override++; |
624 |
# pass the holding branch for use as default |
625 |
my $default_pickup_location = $pickup_locations->search({ branchcode => $item->{holdingbranch} })->next; |
626 |
$item->{default_pickup_location} = $default_pickup_location; |
627 |
} |
628 |
else { |
629 |
$item->{available} = 0; |
630 |
$item->{not_holdable} = "no_valid_pickup_location"; |
631 |
} |
620 |
} else { $num_alreadyheld++ } |
632 |
} else { $num_alreadyheld++ } |
621 |
|
633 |
|
622 |
push( @available_itemtypes, $item->{itype} ); |
634 |
push( @available_itemtypes, $item->{itype} ); |
623 |
- |
|
|