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