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

(-)a/circ/circulation.pl (-8 / +7 lines)
Lines 317-325 if (@$barcodes) { Link Here
317
        };
317
        };
318
318
319
        # always check for blockers on issuing
319
        # always check for blockers on issuing
320
        my ( $error, $needsconfirmation, $alerts, $messages );
320
        my ( $issuingimpossible, $needsconfirmation, $alerts, $messages );
321
        try {
321
        try {
322
            ( $error, $needsconfirmation, $alerts, $messages ) = CanBookBeIssued(
322
            ( $issuingimpossible, $needsconfirmation, $alerts, $messages ) = CanBookBeIssued(
323
                $patron,
323
                $patron,
324
                $barcode, $datedue,
324
                $barcode, $datedue,
325
                $inprocess,
325
                $inprocess,
Lines 333-339 if (@$barcodes) { Link Here
333
            die $_ unless blessed $_ && $_->can('rethrow');
333
            die $_ unless blessed $_ && $_->can('rethrow');
334
334
335
            if ( $_->isa('Koha::Exceptions::Calendar::NoOpenDays') ) {
335
            if ( $_->isa('Koha::Exceptions::Calendar::NoOpenDays') ) {
336
                $error = { NO_OPEN_DAYS => 1 };
336
                $issuingimpossible = { NO_OPEN_DAYS => 1 };
337
            } else {
337
            } else {
338
                $_->rethrow;
338
                $_->rethrow;
339
            }
339
            }
Lines 353-359 if (@$barcodes) { Link Here
353
353
354
    # Fix for bug 7494: optional checkout-time fallback search for a book
354
    # Fix for bug 7494: optional checkout-time fallback search for a book
355
355
356
    if ( $error->{'UNKNOWN_BARCODE'}
356
    if ( $issuingimpossible->{'UNKNOWN_BARCODE'}
357
        && C4::Context->preference("itemBarcodeFallbackSearch")
357
        && C4::Context->preference("itemBarcodeFallbackSearch")
358
        && not $batch
358
        && not $batch
359
    )
359
    )
Lines 386-392 if (@$barcodes) { Link Here
386
    my @blocking_error_codes =
386
    my @blocking_error_codes =
387
        ( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") )
387
        ( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") )
388
        ? qw( UNKNOWN_BARCODE NO_OPEN_DAYS )
388
        ? qw( UNKNOWN_BARCODE NO_OPEN_DAYS )
389
        : ( keys %$error );
389
        : ( keys %$issuingimpossible );
390
390
391
    if ( $error->{BOOKED_TO_ANOTHER} ) {
391
    if ( $error->{BOOKED_TO_ANOTHER} ) {
392
        $template_params->{BOOKED_TO_ANOTHER} = $error->{BOOKED_TO_ANOTHER};
392
        $template_params->{BOOKED_TO_ANOTHER} = $error->{BOOKED_TO_ANOTHER};
Lines 395-402 if (@$barcodes) { Link Here
395
    }
395
    }
396
396
397
    foreach my $code ( @blocking_error_codes ) {
397
    foreach my $code ( @blocking_error_codes ) {
398
        if ($error->{$code}) {
398
        if ($issuingimpossible->{$code}) {
399
            $template_params->{$code} = $error->{$code};
399
            $template_params->{$code} = $issuingimpossible->{$code};
400
400
401
            $template_params->{IMPOSSIBLE} = 1;
401
            $template_params->{IMPOSSIBLE} = 1;
402
            $blocker = 1;
402
            $blocker = 1;
403
- 

Return to bug 35216