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

(-)a/circ/circulation.pl (-8 / +7 lines)
Lines 299-307 if (@$barcodes) { Link Here
299
        };
299
        };
300
300
301
        # always check for blockers on issuing
301
        # always check for blockers on issuing
302
        my ( $error, $needsconfirmation, $alerts, $messages );
302
        my ( $issuingimpossible, $needsconfirmation, $alerts, $messages );
303
        try {
303
        try {
304
            ( $error, $needsconfirmation, $alerts, $messages ) = CanBookBeIssued(
304
            ( $issuingimpossible, $needsconfirmation, $alerts, $messages ) = CanBookBeIssued(
305
                $patron,
305
                $patron,
306
                $barcode, $datedue,
306
                $barcode, $datedue,
307
                $inprocess,
307
                $inprocess,
Lines 315-321 if (@$barcodes) { Link Here
315
            die $_ unless blessed $_ && $_->can('rethrow');
315
            die $_ unless blessed $_ && $_->can('rethrow');
316
316
317
            if ( $_->isa('Koha::Exceptions::Calendar::NoOpenDays') ) {
317
            if ( $_->isa('Koha::Exceptions::Calendar::NoOpenDays') ) {
318
                $error = { NO_OPEN_DAYS => 1 };
318
                $issuingimpossible = { NO_OPEN_DAYS => 1 };
319
            } else {
319
            } else {
320
                $_->rethrow;
320
                $_->rethrow;
321
            }
321
            }
Lines 335-341 if (@$barcodes) { Link Here
335
335
336
    # Fix for bug 7494: optional checkout-time fallback search for a book
336
    # Fix for bug 7494: optional checkout-time fallback search for a book
337
337
338
    if ( $error->{'UNKNOWN_BARCODE'}
338
    if ( $issuingimpossible->{'UNKNOWN_BARCODE'}
339
        && C4::Context->preference("itemBarcodeFallbackSearch")
339
        && C4::Context->preference("itemBarcodeFallbackSearch")
340
        && not $batch
340
        && not $batch
341
    )
341
    )
Lines 368-378 if (@$barcodes) { Link Here
368
    my @blocking_error_codes =
368
    my @blocking_error_codes =
369
        ( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") )
369
        ( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") )
370
        ? qw( UNKNOWN_BARCODE NO_OPEN_DAYS )
370
        ? qw( UNKNOWN_BARCODE NO_OPEN_DAYS )
371
        : ( keys %$error );
371
        : ( keys %$issuingimpossible );
372
372
373
    foreach my $code ( @blocking_error_codes ) {
373
    foreach my $code ( @blocking_error_codes ) {
374
        if ($error->{$code}) {
374
        if ($issuingimpossible->{$code}) {
375
            $template_params->{$code} = $error->{$code};
375
            $template_params->{$code} = $issuingimpossible->{$code};
376
            $template_params->{IMPOSSIBLE} = 1;
376
            $template_params->{IMPOSSIBLE} = 1;
377
            $blocker = 1;
377
            $blocker = 1;
378
        }
378
        }
379
- 

Return to bug 35216