|
Lines 372-392
if (@$barcodes) {
Link Here
|
| 372 |
} |
372 |
} |
| 373 |
} |
373 |
} |
| 374 |
|
374 |
|
| 375 |
if ( $error->{DEBT_GUARANTORS} ) { |
375 |
# Only some errors will block when performing forced onsite checkout, |
| 376 |
$template_params->{DEBT_GUARANTORS} = $error->{DEBT_GUARANTORS}; |
376 |
# for other cases all errors will block |
| 377 |
$template_params->{IMPOSSIBLE} = 1; |
377 |
my @blocking_error_codes = ($onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce")) ? |
| 378 |
$blocker = 1; |
378 |
qw( UNKNOWN_BARCODE ) : (keys %$error); |
| 379 |
} |
379 |
|
| 380 |
|
380 |
foreach my $code ( @blocking_error_codes ) { |
| 381 |
if ( $error->{UNKNOWN_BARCODE} or not $onsite_checkout or not C4::Context->preference("OnSiteCheckoutsForce") ) { |
381 |
if ($error->{$code}) { |
| 382 |
delete $question->{'DEBT'} if ($debt_confirmed); |
382 |
$template_params->{$code} = $error->{$code}; |
| 383 |
foreach my $impossible ( keys %$error ) { |
|
|
| 384 |
$template_params->{$impossible} = $$error{$impossible}; |
| 385 |
$template_params->{IMPOSSIBLE} = 1; |
383 |
$template_params->{IMPOSSIBLE} = 1; |
| 386 |
$blocker = 1; |
384 |
$blocker = 1; |
| 387 |
} |
385 |
} |
| 388 |
} |
386 |
} |
| 389 |
|
387 |
|
|
|
388 |
delete $question->{'DEBT'} if ($debt_confirmed); |
| 389 |
|
| 390 |
if( $item and ( !$blocker or $force_allow_issue ) ){ |
390 |
if( $item and ( !$blocker or $force_allow_issue ) ){ |
| 391 |
my $confirm_required = 0; |
391 |
my $confirm_required = 0; |
| 392 |
unless($issueconfirmed){ |
392 |
unless($issueconfirmed){ |
| 393 |
- |
|
|