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

(-)a/C4/Circulation.pm (-13 / +15 lines)
Lines 3121-3138 sub CanBookBeRenewed { Link Here
3121
    }
3121
    }
3122
3122
3123
    # CHECK FOR BOOKINGS
3123
    # CHECK FOR BOOKINGS
3124
    my $startdate =
3124
    if( $item->bookings->count ){
3125
        ( C4::Context->preference('RenewalPeriodBase') eq 'date_due' )
3125
        my $startdate =
3126
        ? dt_from_string( $issue->date_due, 'sql' )
3126
            ( C4::Context->preference('RenewalPeriodBase') eq 'date_due' )
3127
        : dt_from_string();
3127
            ? dt_from_string( $issue->date_due, 'sql' )
3128
    my $datedue = CalcDateDue( $startdate, $item->effective_itemtype, $branchcode, $patron, 'is a renewal' );
3128
            : dt_from_string();
3129
    if (
3129
        my $datedue = CalcDateDue( $startdate, $item->effective_itemtype, $branchcode, $patron, 'is a renewal' );
3130
        my $booking = $item->find_booking(
3130
        if (
3131
            { checkout_date => $startdate, due_date => $datedue, patron_id => $patron->borrowernumber }
3131
            my $booking = $item->find_booking(
3132
        )
3132
                { checkout_date => $startdate, due_date => $datedue, patron_id => $patron->borrowernumber }
3133
        )
3133
            )
3134
    {
3134
            )
3135
        return ( 0, 'booked' ) unless ( $booking->patron_id == $patron->borrowernumber );
3135
        {
3136
            return ( 0, 'booked' ) unless ( $booking->patron_id == $patron->borrowernumber );
3137
        }
3138
3136
    }
3139
    }
3137
3140
3138
    if ( $auto_renew eq 'auto_too_soon' ) {
3141
    if ( $auto_renew eq 'auto_too_soon' ) {
3139
- 

Return to bug 35944