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

(-)a/C4/Circulation.pm (-1 / +1 lines)
Lines 3457-3463 sub GetSoonestRenewDate { Link Here
3457
        {
3457
        {
3458
            $soonestrenewal->truncate( to => 'day' );
3458
            $soonestrenewal->truncate( to => 'day' );
3459
        }
3459
        }
3460
        return $soonestrenewal if $now < $soonestrenewal;
3460
        return $soonestrenewal;
3461
    } elsif ( $issue->auto_renew && $patron->autorenew_checkouts ) {
3461
    } elsif ( $issue->auto_renew && $patron->autorenew_checkouts ) {
3462
        # Checkouts with auto-renewing fall back to due date
3462
        # Checkouts with auto-renewing fall back to due date
3463
        my $soonestrenewal = dt_from_string( $issue->date_due );
3463
        my $soonestrenewal = dt_from_string( $issue->date_due );
(-)a/t/db_dependent/Circulation.t (-2 / +2 lines)
Lines 5869-5880 subtest "GetSoonestRenewDate tests" => sub { Link Here
5869
            rule_value   => 1,
5869
            rule_value   => 1,
5870
        }
5870
        }
5871
    );
5871
    );
5872
    $issue->date_due( dt_from_string )->store;
5872
    $issue->date_due(dt_from_string)->store;
5873
    is(
5873
    is(
5874
        GetSoonestRenewDate( $patron, $issue ),
5874
        GetSoonestRenewDate( $patron, $issue ),
5875
        dt_from_string->subtract( days => 1 )->truncate( to => 'day' ),
5875
        dt_from_string->subtract( days => 1 )->truncate( to => 'day' ),
5876
        'Checkouts with auto-renewal can be renewed 1 day before due date if no renewalbefore = 1 and precision = "date"'
5876
        'Checkouts with auto-renewal can be renewed 1 day before due date if no renewalbefore = 1 and precision = "date"'
5877
    );
5877
    );
5878
5878
};
5879
};
5879
5880
5880
subtest "CanBookBeIssued + needsconfirmation message" => sub {
5881
subtest "CanBookBeIssued + needsconfirmation message" => sub {
5881
- 

Return to bug 30362