Lines 383-394
sub _checkHoldPolicy {
Link Here
|
383 |
my $hold_fulfillment_policy = $item->{hold_fulfillment_policy}; |
383 |
my $hold_fulfillment_policy = $item->{hold_fulfillment_policy}; |
384 |
|
384 |
|
385 |
return 0 if $hold_fulfillment_policy eq 'holdgroup' && !$library->validate_hold_sibling({branchcode => $request->{branchcode}}); |
385 |
return 0 if $hold_fulfillment_policy eq 'holdgroup' && !$library->validate_hold_sibling({branchcode => $request->{branchcode}}); |
386 |
return 0 if $hold_fulfillment_policy eq 'homebranch' && $request->{branchcode} ne $item->$hold_fulfillment_policy; |
386 |
return 0 if $hold_fulfillment_policy eq 'homebranch' && $request->{branchcode} ne $item->{$hold_fulfillment_policy}; |
387 |
return 0 if $hold_fulfillment_policy eq 'holdingbranch' && $request->{branchcode} ne $item->$hold_fulfillment_policy; |
387 |
return 0 if $hold_fulfillment_policy eq 'holdingbranch' && $request->{branchcode} ne $item->{$hold_fulfillment_policy}; |
388 |
|
388 |
|
389 |
my $patronLibrary = Koha::Libraries->find($request->{borrowerbranch}); |
389 |
my $patronLibrary = Koha::Libraries->find($request->{borrowerbranch}); |
390 |
|
390 |
|
391 |
return 0 if $hold_fulfillment_policy eq 'patrongroup' && !patronLibrary->validate_hold_sibling({branchcode => $request->{branchcode}}); |
391 |
return 0 if $hold_fulfillment_policy eq 'patrongroup' && !$patronLibrary->validate_hold_sibling({branchcode => $request->{branchcode}}); |
392 |
|
392 |
|
393 |
return 1; |
393 |
return 1; |
394 |
|
394 |
|