Lines 551-560
sub CanItemBeReserved {
Link Here
|
551 |
unless ($item->can_be_transferred({ to => $destination })) { |
551 |
unless ($item->can_be_transferred({ to => $destination })) { |
552 |
return { status => 'cannotBeTransferred' }; |
552 |
return { status => 'cannotBeTransferred' }; |
553 |
} |
553 |
} |
554 |
unless ($branchitemrule->{hold_fulfillment_policy} ne 'holdgroup' || $item_library->validate_hold_sibling( {branchcode => $pickup_branchcode} )) { |
554 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup' && !$item_library->validate_hold_sibling( {branchcode => $pickup_branchcode} )) { |
555 |
return { status => 'pickupNotInHoldGroup' }; |
555 |
return { status => 'pickupNotInHoldGroup' }; |
556 |
} |
556 |
} |
557 |
unless ($branchitemrule->{hold_fulfillment_policy} ne 'patrongroup' || Koha::Libraries->find({branchcode => $borrower->{branchcode}})->validate_hold_sibling({branchcode => $pickup_branchcode})) { |
557 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup' && !Koha::Libraries->find({branchcode => $borrower->{branchcode}})->validate_hold_sibling({branchcode => $pickup_branchcode})) { |
558 |
return { status => 'pickupNotInHoldGroup' }; |
558 |
return { status => 'pickupNotInHoldGroup' }; |
559 |
} |
559 |
} |
560 |
} |
560 |
} |