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

(-)a/C4/Circulation.pm (-5 / +4 lines)
Lines 982-997 sub CanBookBeIssued { Link Here
982
        # Index points to the next value
982
        # Index points to the next value
983
        my $restrictionyear = 0;
983
        my $restrictionyear = 0;
984
        if (($take <= $#values) && ($take >= 0)){
984
        if (($take <= $#values) && ($take >= 0)){
985
            $restrictionyear += @values[$take];
985
            $restrictionyear += $values[$take];
986
        }
986
        }
987
987
988
        if ($restrictionyear > 0) {
988
        if ($restrictionyear > 0) {
989
            if ( $borrower->{'dateofbirth'}  ) {
989
            if ( $borrower->{'dateofbirth'}  ) {
990
                my @alloweddate =  split /-/,$borrower->{'dateofbirth'} ;
990
                my @alloweddate =  split /-/,$borrower->{'dateofbirth'} ;
991
                @alloweddate[0] += $restrictionyear;
991
                $alloweddate[0] += $restrictionyear;
992
                #Prevent runime eror on leap year (invalid date)
992
                #Prevent runime eror on leap year (invalid date)
993
                if ((@alloweddate[1] == 2) && (@alloweddate[2] == 29)) {
993
                if (($alloweddate[1] == 2) && ($alloweddate[2] == 29)) {
994
                    @alloweddate[2] = 28;
994
                    $alloweddate[2] = 28;
995
                }
995
                }
996
996
997
                if ( Date_to_Days(Today) <  Date_to_Days(@alloweddate) -1  ) {
997
                if ( Date_to_Days(Today) <  Date_to_Days(@alloweddate) -1  ) {
998
- 

Return to bug 7621