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

(-)a/C4/Reserves.pm (-4 / +14 lines)
Lines 491-501 sub CanItemBeReserved{ Link Here
491
    }
491
    }
492
    
492
    
493
    # we check if it's ok or not
493
    # we check if it's ok or not
494
    if( $reservecount < $allowedreserves ){
494
    if( $reservecount >= $allowedreserves ){
495
        return 1;
496
    }else{
497
        return 0;
495
        return 0;
498
    }
496
    }
497
498
    # If reservecount is ok, we check item branch if IndependantBranches is ON
499
    # and canreservefromotherbranches is OFF
500
    if ( C4::Context->preference('IndependantBranches')
501
        and !C4::Context->preference('canreservefromotherbranches') )
502
    {
503
        my $itembranch = $item->{holdingbranch} // $item->{homebranch};
504
        if ($itembranch ne $borrower->{branchcode}) {
505
            return 0;
506
        }
507
    }
508
509
    return 1;
499
}
510
}
500
#--------------------------------------------------------------------------------
511
#--------------------------------------------------------------------------------
501
=head2 GetReserveCount
512
=head2 GetReserveCount
502
- 

Return to bug 2394