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