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

(-)a/C4/Circulation.pm (-1 / +15 lines)
Lines 3335-3341 sub CanBookBeRenewed { Link Here
3335
        {
3335
        {
3336
            return ( 0, 'booked' ) unless ( $booking->patron_id == $patron->borrowernumber );
3336
            return ( 0, 'booked' ) unless ( $booking->patron_id == $patron->borrowernumber );
3337
        }
3337
        }
3338
    }
3338
3339
3340
    # CHECK FOR QUOTAS
3341
    if ( my $quota = Koha::Patron::Quotas->get_patron_quota($patron->borrowernumber) ) {
3342
        unless ( $quota->has_available_quota ) {
3343
            return ( 0, "QUOTA_EXCEEDED" );
3344
        }
3339
    }
3345
    }
3340
3346
3341
    if ( $auto_renew eq 'auto_too_soon' ) {
3347
    if ( $auto_renew eq 'auto_too_soon' ) {
Lines 3450-3455 sub AddRenewal { Link Here
3450
3456
3451
    my $circ_library = Koha::Libraries->find( _GetCircControlBranch( $item_object, $patron ) );
3457
    my $circ_library = Koha::Libraries->find( _GetCircControlBranch( $item_object, $patron ) );
3452
3458
3459
    # Check quotas and record usage if needed
3460
    if ( my $quota = Koha::Patron::Quotas->get_patron_quota($patron->borrowernumber) ) {
3461
        # Update patron's used quota value
3462
        $quota->add_usage({
3463
            patron_id => $patron->patron_id,
3464
            issue_id => $issue->issue_id,
3465
        });
3466
    }
3467
3453
    my $schema = Koha::Database->schema;
3468
    my $schema = Koha::Database->schema;
3454
    $schema->txn_do(
3469
    $schema->txn_do(
3455
        sub {
3470
        sub {
3456
- 

Return to bug 38924