Lines 290-325
if ($patron) {
Link Here
|
290 |
# |
290 |
# |
291 |
# |
291 |
# |
292 |
if (@$barcodes) { |
292 |
if (@$barcodes) { |
293 |
my $checkout_infos; |
293 |
my $checkout_infos; |
294 |
for my $barcode ( @$barcodes ) { |
294 |
for my $barcode ( @$barcodes ) { |
295 |
|
295 |
|
296 |
my $template_params = { |
296 |
my $template_params = { |
297 |
barcode => $barcode, |
297 |
barcode => $barcode, |
298 |
onsite_checkout => $onsite_checkout, |
298 |
onsite_checkout => $onsite_checkout, |
299 |
}; |
299 |
}; |
300 |
|
300 |
|
301 |
# always check for blockers on issuing |
301 |
# always check for blockers on issuing |
302 |
my ( $error, $question, $alerts, $messages ); |
302 |
my ( $error, $question, $alerts, $messages ); |
303 |
try { |
303 |
try { |
304 |
( $error, $question, $alerts, $messages ) = CanBookBeIssued( |
304 |
( $error, $question, $alerts, $messages ) = CanBookBeIssued( |
305 |
$patron, |
305 |
$patron, |
306 |
$barcode, $datedue, |
306 |
$barcode, $datedue, |
307 |
$inprocess, |
307 |
$inprocess, |
308 |
undef, |
308 |
undef, |
309 |
{ |
309 |
{ |
310 |
onsite_checkout => $onsite_checkout, |
310 |
onsite_checkout => $onsite_checkout, |
311 |
override_high_holds => $override_high_holds || $override_high_holds_tmp || 0, |
311 |
override_high_holds => $override_high_holds || $override_high_holds_tmp || 0, |
312 |
} |
312 |
} |
313 |
); |
313 |
); |
314 |
} catch { |
314 |
} catch { |
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 |
$error = { NO_OPEN_DAYS => 1 }; |
319 |
} else { |
319 |
} else { |
320 |
$_->rethrow; |
320 |
$_->rethrow; |
321 |
} |
321 |
} |
322 |
}; |
322 |
}; |
323 |
|
323 |
|
324 |
my $blocker = $invalidduedate ? 1 : 0; |
324 |
my $blocker = $invalidduedate ? 1 : 0; |
325 |
|
325 |
|
Lines 365-372
if (@$barcodes) {
Link Here
|
365 |
|
365 |
|
366 |
# Only some errors will block when performing forced onsite checkout, |
366 |
# Only some errors will block when performing forced onsite checkout, |
367 |
# for other cases all errors will block |
367 |
# for other cases all errors will block |
368 |
my @blocking_error_codes = ($onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce")) ? |
368 |
my @blocking_error_codes = |
369 |
qw( UNKNOWN_BARCODE NO_OPEN_DAYS ) : (keys %$error); |
369 |
( $onsite_checkout and C4::Context->preference("OnSiteCheckoutsForce") ) |
|
|
370 |
? qw( UNKNOWN_BARCODE NO_OPEN_DAYS ) |
371 |
: ( keys %$error ); |
370 |
|
372 |
|
371 |
foreach my $code ( @blocking_error_codes ) { |
373 |
foreach my $code ( @blocking_error_codes ) { |
372 |
if ($error->{$code}) { |
374 |
if ($error->{$code}) { |
373 |
- |
|
|