|
Lines 272-289
if ($barcode) {
Link Here
|
| 272 |
my $checkout = $item->checkout; |
272 |
my $checkout = $item->checkout; |
| 273 |
my $biblio = $item->biblio; |
273 |
my $biblio = $item->biblio; |
| 274 |
$template->param( |
274 |
$template->param( |
| 275 |
title => $biblio->title, |
275 |
title => $biblio->title, |
| 276 |
homebranch => $item->homebranch, |
276 |
homebranch => $item->homebranch, |
| 277 |
holdingbranch => $item->holdingbranch, |
277 |
holdingbranch => $item->holdingbranch, |
| 278 |
returnbranch => $returnbranch, |
278 |
returnbranch => $returnbranch, |
| 279 |
author => $biblio->author, |
279 |
author => $biblio->author, |
| 280 |
itembarcode => $item->barcode, |
280 |
itembarcode => $item->barcode, |
| 281 |
itemtype => $item->effective_itemtype, |
281 |
itemtype => $item->effective_itemtype, |
| 282 |
ccode => $item->ccode, |
282 |
ccode => $item->ccode, |
| 283 |
itembiblionumber => $biblio->biblionumber, |
283 |
itembiblionumber => $biblio->biblionumber, |
| 284 |
biblionumber => $biblio->biblionumber, |
284 |
biblionumber => $biblio->biblionumber, |
| 285 |
additional_materials => $materials, |
285 |
additional_materials => $materials, |
| 286 |
issue => $checkout, |
286 |
issue => $checkout, |
| 287 |
); |
287 |
); |
| 288 |
} # FIXME else we should not call AddReturn but set BadBarcode directly instead |
288 |
} # FIXME else we should not call AddReturn but set BadBarcode directly instead |
| 289 |
|
289 |
|
|
Lines 295-303
if ($barcode) {
Link Here
|
| 295 |
|
295 |
|
| 296 |
my $return_date = $dropboxmode ? $dropboxdate : $return_date_override_dt; |
296 |
my $return_date = $dropboxmode ? $dropboxdate : $return_date_override_dt; |
| 297 |
|
297 |
|
|
|
298 |
# Block return if multi-part and confirm has not been received |
| 299 |
my $needs_confirm = 0; |
| 300 |
if ( C4::Context->preference("CircConfirmParts") ) { |
| 301 |
if ( $item->materials > 0 && !$query->param('multiple_confirm') ) { |
| 302 |
$needs_confirm = 1; |
| 303 |
} |
| 304 |
} |
| 305 |
|
| 298 |
# do the return |
306 |
# do the return |
| 299 |
( $returned, $messages, $issue, $borrower ) = |
307 |
( $returned, $messages, $issue, $borrower ) = |
| 300 |
AddReturn( $barcode, $userenv_branch, $exemptfine, $return_date ); |
308 |
AddReturn( $barcode, $userenv_branch, $exemptfine, $return_date ) |
|
|
309 |
unless $needs_confirm; |
| 301 |
|
310 |
|
| 302 |
if ($returned) { |
311 |
if ($returned) { |
| 303 |
my $time_now = dt_from_string()->truncate( to => 'minute'); |
312 |
my $time_now = dt_from_string()->truncate( to => 'minute'); |
|
Lines 338-350
if ($barcode) {
Link Here
|
| 338 |
); |
347 |
); |
| 339 |
} |
348 |
} |
| 340 |
} |
349 |
} |
| 341 |
} elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} ) { |
350 |
} elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} and !$needs_confirm ) { |
| 342 |
$input{duedate} = 0; |
351 |
$input{duedate} = 0; |
| 343 |
$returneditems{0} = $barcode; |
352 |
$returneditems{0} = $barcode; |
| 344 |
$riduedate{0} = 0; |
353 |
$riduedate{0} = 0; |
| 345 |
push( @inputloop, \%input ); |
354 |
push( @inputloop, \%input ); |
| 346 |
} |
355 |
} |
| 347 |
$template->param( privacy => $borrower->{privacy} ); |
356 |
$template->param( privacy => $borrower->{privacy} ); |
|
|
357 |
|
| 358 |
if ( $needs_confirm ) { |
| 359 |
$template->param( needs_confirm => $needs_confirm ); |
| 360 |
} |
| 348 |
} |
361 |
} |
| 349 |
$template->param( inputloop => \@inputloop ); |
362 |
$template->param( inputloop => \@inputloop ); |
| 350 |
|
363 |
|