Lines 4316-4338
sub _CanBookBeAutoRenewed {
Link Here
|
4316 |
} |
4316 |
} |
4317 |
} |
4317 |
} |
4318 |
|
4318 |
|
4319 |
if ( defined $issuing_rule->{norenewalbefore} |
4319 |
if ( $soonest_renew_date > dt_from_string()) { |
4320 |
and $issuing_rule->{norenewalbefore} ne "" ) { |
4320 |
return "auto_too_soon"; |
4321 |
if ( $soonest_renew_date > dt_from_string()) { |
|
|
4322 |
return "auto_too_soon"; |
4323 |
} else { |
4324 |
return "ok"; |
4325 |
} |
4326 |
} |
4321 |
} |
4327 |
|
4322 |
|
4328 |
# Fallback for automatic renewals: |
4323 |
return "ok"; |
4329 |
# If norenewalbefore is undef, don't renew before due date. |
|
|
4330 |
my $now = dt_from_string; |
4331 |
if ( $now >= dt_from_string( $issue->date_due, 'sql' ) ){ |
4332 |
return "ok"; |
4333 |
} else { |
4334 |
return "auto_too_soon"; |
4335 |
} |
4336 |
} |
4324 |
} |
4337 |
|
4325 |
|
4338 |
sub _item_denied_renewal { |
4326 |
sub _item_denied_renewal { |
4339 |
- |
|
|