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

(-)a/C4/Circulation.pm (-3 / +13 lines)
Lines 3100-3112 sub CanBookBeRenewed { Link Here
3100
        }
3100
        }
3101
    }
3101
    }
3102
3102
3103
    return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $auto_renew =~ 'too_soon';#$auto_renew ne "no" && $auto_renew ne "ok";
3103
    if($auto_renew =~ 'too_soon'){
3104
3105
        # If its cron, tell it it's too soon for a an auto renewal
3106
        return ( 0, $auto_renew, { soonest_renew_date => $soonest } ) if $cron;
3107
3108
        # Check if it's too soon for a manual renewal
3109
        my $soonestManual = GetSoonestRenewDate( $patron, $issue );
3110
        if($soonestManual > dt_from_string()){
3111
            return (0, "too_soon", { soonest_renew_date => $soonestManual } ) unless $override_limit;
3112
        }
3113
    }
3114
3104
    $soonest = GetSoonestRenewDate($patron, $issue);
3115
    $soonest = GetSoonestRenewDate($patron, $issue);
3105
    if ( $soonest > dt_from_string() ){
3116
    if ( $soonest > dt_from_string() ){
3106
        return (0, "too_soon", { soonest_renew_date => $soonest } ) unless $override_limit;
3117
        return (0, "too_soon", { soonest_renew_date => $soonest } ) unless $override_limit;
3107
    }
3118
    }
3108
3119
3109
    return ( 0, "auto_renew" ) if $auto_renew eq "ok" && !$override_limit; # 0 if auto-renewal should not succeed
3120
    return ( 1, "auto_renew" ) if $auto_renew eq "ok" || $auto_renew eq "auto_too_soon" && !$override_limit;    # 0 if auto-renewal should not succeed
3110
3121
3111
    return ( 1, undef );
3122
    return ( 1, undef );
3112
}
3123
}
3113
- 

Return to bug 25393