@@ -, +, @@ in --- circ/returns.pl | 15 +++++++++++++-- .../intranet-tmpl/prog/en/modules/circ/returns.tt | 6 ++++++ 2 files changed, 19 insertions(+), 2 deletions(-) --- a/circ/returns.pl +++ a/circ/returns.pl @@ -413,9 +413,17 @@ if ($barcode) { } } elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} and !$needs_confirm and !$bundle_confirm ) { - $input{duedate} = 0; + my $duedate = 0; + if( $issue ){ + my $date_due_dt = dt_from_string( $issue->date_due, 'sql' ); + $duedate = $date_due_dt->strftime('%Y-%m-%d %H:%M'); + $input{borrowernumber} = $issue->borrowernumber; + $riborrowernumber{0} = $borrower->{'borrowernumber'}; + } + $input{duedate} = $duedate; + $input{not_returned} = 1; $returneditems{0} = $barcode; - $riduedate{0} = 0; + $riduedate{0} = $duedate; push( @inputloop, \%input ); } $template->param( privacy => $borrower->{privacy} ); @@ -789,6 +797,8 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { next unless $item; # FIXME The item has been deleted in the meantime, # we could handle that better displaying a message in the template + + $ri{not_returned} = 1 unless $returned; my $biblio = $item->biblio; # FIXME pass $item to the template and we are done here... $ri{itembiblionumber} = $biblio->biblionumber; @@ -810,6 +820,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{homebranch} = $item->homebranch; $ri{transferbranch} = $item->get_transfer ? $item->get_transfer->tobranch : ''; $ri{damaged} = $item->damaged; + $ri{withdrawn} = $item->withdrawn; $ri{transferreason} = $item->get_transfer ? $item->get_transfer->reason : ''; $ri{location} = $item->location; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1237,6 +1237,9 @@ [% FOREACH riloo IN riloop %] + [% IF ( riloo.not_returned ) %] + Item was not checked in + [% END %] [% IF ( riloo.duedate ) %] [% IF ( riloo.return_overdue ) %] [% riloo.duedate | $KohaDates as_due_date => 1 %] (overdue) @@ -1249,6 +1252,9 @@ [% IF ( riloo.damaged ) %] [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => riloo.damaged ) | html %] [% END %] + [% IF ( riloo.withdrawn ) %] + [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => riloo.withdrawn ) | html %] + [% END %] --