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

(-)a/C4/HoldsQueue.pm (-3 / +3 lines)
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
(-)a/Koha/Library.pm (-1 / +3 lines)
Lines 240-245 Return if given library is a valid hold group member Link Here
240
240
241
sub validate_hold_sibling {
241
sub validate_hold_sibling {
242
    my ( $self, $params ) = @_;
242
    my ( $self, $params ) = @_;
243
244
    return 1 if $params->{branchcode} eq $self->id;
245
243
    my @hold_libraries = $self->get_hold_libraries;
246
    my @hold_libraries = $self->get_hold_libraries;
244
247
245
    foreach (@hold_libraries) {
248
    foreach (@hold_libraries) {
246
- 

Return to bug 27068