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

(-)a/C4/Circulation.pm (-16 / +4 lines)
Lines 4457-4479 sub _CanBookBeAutoRenewed { Link Here
4457
        }
4457
        }
4458
    }
4458
    }
4459
4459
4460
    if ( defined $issuing_rule->{norenewalbefore}
4460
    if ( GetSoonestRenewDate( $patron->id, $item->id ) > dt_from_string() )
4461
        and $issuing_rule->{norenewalbefore} ne "" ) {
4461
    {
4462
        if ( GetSoonestRenewDate($patron->id, $item->id) > dt_from_string()) {
4463
            return "auto_too_soon";
4464
        } else {
4465
            return "ok";
4466
        }
4467
    }
4468
4469
    # Fallback for automatic renewals:
4470
    # If norenewalbefore is undef, don't renew before due date.
4471
    my $now = dt_from_string;
4472
    if ( $now >= dt_from_string( $issue->date_due, 'sql' ) ){
4473
        return "ok";
4474
    } else {
4475
        return "auto_too_soon";
4462
        return "auto_too_soon";
4476
    }
4463
    }
4464
4465
    return "ok";
4477
}
4466
}
4478
4467
4479
sub _item_denied_renewal {
4468
sub _item_denied_renewal {
4480
- 

Return to bug 29537