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