Lines 413-421
if ($barcode) {
Link Here
|
413 |
} |
413 |
} |
414 |
|
414 |
|
415 |
} elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} and !$needs_confirm and !$bundle_confirm ) { |
415 |
} elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} and !$needs_confirm and !$bundle_confirm ) { |
416 |
$input{duedate} = 0; |
416 |
my $duedate = 0; |
|
|
417 |
if( $issue ){ |
418 |
my $date_due_dt = dt_from_string( $issue->date_due, 'sql' ); |
419 |
$duedate = $date_due_dt->strftime('%Y-%m-%d %H:%M'); |
420 |
$input{borrowernumber} = $issue->borrowernumber; |
421 |
$riborrowernumber{0} = $borrower->{'borrowernumber'}; |
422 |
} |
423 |
$input{duedate} = $duedate; |
424 |
$input{not_returned} = 1; |
417 |
$returneditems{0} = $barcode; |
425 |
$returneditems{0} = $barcode; |
418 |
$riduedate{0} = 0; |
426 |
$riduedate{0} = $duedate; |
419 |
push( @inputloop, \%input ); |
427 |
push( @inputloop, \%input ); |
420 |
} |
428 |
} |
421 |
$template->param( privacy => $borrower->{privacy} ); |
429 |
$template->param( privacy => $borrower->{privacy} ); |
Lines 789-794
foreach ( sort { $a <=> $b } keys %returneditems ) {
Link Here
|
789 |
next unless $item; # FIXME The item has been deleted in the meantime, |
797 |
next unless $item; # FIXME The item has been deleted in the meantime, |
790 |
# we could handle that better displaying a message in the template |
798 |
# we could handle that better displaying a message in the template |
791 |
|
799 |
|
|
|
800 |
|
801 |
$ri{not_returned} = 1 unless $returned; |
792 |
my $biblio = $item->biblio; |
802 |
my $biblio = $item->biblio; |
793 |
# FIXME pass $item to the template and we are done here... |
803 |
# FIXME pass $item to the template and we are done here... |
794 |
$ri{itembiblionumber} = $biblio->biblionumber; |
804 |
$ri{itembiblionumber} = $biblio->biblionumber; |
Lines 810-815
foreach ( sort { $a <=> $b } keys %returneditems ) {
Link Here
|
810 |
$ri{homebranch} = $item->homebranch; |
820 |
$ri{homebranch} = $item->homebranch; |
811 |
$ri{transferbranch} = $item->get_transfer ? $item->get_transfer->tobranch : ''; |
821 |
$ri{transferbranch} = $item->get_transfer ? $item->get_transfer->tobranch : ''; |
812 |
$ri{damaged} = $item->damaged; |
822 |
$ri{damaged} = $item->damaged; |
|
|
823 |
$ri{withdrawn} = $item->withdrawn; |
813 |
$ri{transferreason} = $item->get_transfer ? $item->get_transfer->reason : ''; |
824 |
$ri{transferreason} = $item->get_transfer ? $item->get_transfer->reason : ''; |
814 |
|
825 |
|
815 |
$ri{location} = $item->location; |
826 |
$ri{location} = $item->location; |