Bug 42298: Automatic renewals should only respect the "No automatic renewals before" rule
To test: 1. prove t/db_dependent/Circulation.t 2. Observe success Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
5fa5012ebe
commit
7412a3e38d
|
|
@ -3494,17 +3494,13 @@ sub CanBookBeRenewed {
|
|||
|
||||
# If its cron, tell it it's too soon for a an auto renewal
|
||||
return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $cron;
|
||||
|
||||
# Check if it's too soon for a manual renewal
|
||||
my $soonestManual = GetSoonestRenewDate( $patron, $issue );
|
||||
if ( $soonestManual > dt_from_string() ) {
|
||||
return ( 0, "too_soon", { soonest_renew_date => $soonestManual } ) unless $override_limit;
|
||||
}
|
||||
}
|
||||
|
||||
$soonest = GetSoonestRenewDate( $patron, $issue );
|
||||
if ( $soonest > dt_from_string() ) {
|
||||
return ( 0, "too_soon", { soonest_renew_date => $soonest } ) unless $override_limit;
|
||||
unless ($cron) {
|
||||
$soonest = GetSoonestRenewDate( $patron, $issue );
|
||||
if ( $soonest > dt_from_string() ) {
|
||||
return ( 0, "too_soon", { soonest_renew_date => $soonest } ) unless $override_limit;
|
||||
}
|
||||
}
|
||||
|
||||
my $auto_renew_code =
|
||||
|
|
|
|||
Loading…
Reference in New Issue