Lines 566-575
sub CanItemBeReserved {
Link Here
|
566 |
unless ($item->can_be_transferred({ to => $destination })) { |
566 |
unless ($item->can_be_transferred({ to => $destination })) { |
567 |
return { status => 'cannotBeTransferred' }; |
567 |
return { status => 'cannotBeTransferred' }; |
568 |
} |
568 |
} |
569 |
unless ($branchitemrule->{hold_fulfillment_policy} ne 'holdgroup' || $item_library->validate_hold_sibling( {branchcode => $pickup_branchcode} )) { |
569 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup' && !$item_library->validate_hold_sibling( {branchcode => $pickup_branchcode} )) { |
570 |
return { status => 'pickupNotInHoldGroup' }; |
570 |
return { status => 'pickupNotInHoldGroup' }; |
571 |
} |
571 |
} |
572 |
unless ($branchitemrule->{hold_fulfillment_policy} ne 'patrongroup' || Koha::Libraries->find({branchcode => $borrower->{branchcode}})->validate_hold_sibling({branchcode => $pickup_branchcode})) { |
572 |
if ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup' && !Koha::Libraries->find({branchcode => $borrower->{branchcode}})->validate_hold_sibling({branchcode => $pickup_branchcode})) { |
573 |
return { status => 'pickupNotInHoldGroup' }; |
573 |
return { status => 'pickupNotInHoldGroup' }; |
574 |
} |
574 |
} |
575 |
} |
575 |
} |