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

(-)a/C4/Reserves.pm (-5 / +3 lines)
Lines 1322-1329 sub ItemsAnyAvailableAndNotRestricted { Link Here
1322
1322
1323
    my @items = Koha::Items->search( { biblionumber => $param->{biblionumber} } );
1323
    my @items = Koha::Items->search( { biblionumber => $param->{biblionumber} } );
1324
1324
1325
    my $any_available = 0;
1326
1327
    foreach my $i (@items) {
1325
    foreach my $i (@items) {
1328
        my $reserves_control_branch =
1326
        my $reserves_control_branch =
1329
            GetReservesControlBranch( $i->unblessed(), $param->{patron}->unblessed );
1327
            GetReservesControlBranch( $i->unblessed(), $param->{patron}->unblessed );
Lines 1331-1337 sub ItemsAnyAvailableAndNotRestricted { Link Here
1331
            C4::Circulation::GetBranchItemRule( $reserves_control_branch, $i->itype );
1329
            C4::Circulation::GetBranchItemRule( $reserves_control_branch, $i->itype );
1332
        my $item_library = Koha::Libraries->find( { branchcode => $i->homebranch } );
1330
        my $item_library = Koha::Libraries->find( { branchcode => $i->homebranch } );
1333
1331
1334
        $any_available = 1
1332
        # we can return (end the loop) when first one found:
1333
        return 1
1335
            unless $i->itemlost
1334
            unless $i->itemlost
1336
            || $i->notforloan > 0
1335
            || $i->notforloan > 0
1337
            || $i->withdrawn
1336
            || $i->withdrawn
Lines 1344-1350 sub ItemsAnyAvailableAndNotRestricted { Link Here
1344
            || $branchitemrule->{holdallowed} == 3 && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } );
1343
            || $branchitemrule->{holdallowed} == 3 && ! $item_library->validate_hold_sibling( { branchcode => $param->{patron}->branchcode } );
1345
    }
1344
    }
1346
1345
1347
    return $any_available;
1346
    return 0;
1348
}
1347
}
1349
1348
1350
=head2 AlterPriority
1349
=head2 AlterPriority
1351
- 

Return to bug 24683