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

(-)a/Koha/Biblio.pm (-2 / +6 lines)
Lines 394-400 sub check_booking { Link Here
394
        ? $existing_bookings->search( { booking_id => { '!=' => $booking_id } } )->count
394
        ? $existing_bookings->search( { booking_id => { '!=' => $booking_id } } )->count
395
        : $existing_bookings->count;
395
        : $existing_bookings->count;
396
396
397
    my $checkouts = $self->current_checkouts->search( { date_due => { '>=' => $dtf->format_datetime($start_date) } } );
397
    my $checkouts = $self->current_checkouts->search(
398
        {
399
            date_due   => { '>='      => $dtf->format_datetime($start_date) },
400
            itemnumber => { '-not_in' => { $existing_bookings->_resultset->get_column('item_id')->as_query } }
401
        }
402
    );
398
    $booked_count += $checkouts->count;
403
    $booked_count += $checkouts->count;
399
404
400
    return ( ( $total_bookable - $booked_count ) > 0 ) ? 1 : 0;
405
    return ( ( $total_bookable - $booked_count ) > 0 ) ? 1 : 0;
401
- 

Return to bug 40644