Bug 8461: Display information on withdrawn item when checked in
This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information. To test: 1 - Enable system preference 'ShowAllCheckins' 2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block' 3 - Check out an item to a patron 4 - Mark the item as withdrawn 5 - Check the item in 6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn' 7 - Note the Checked-in items table says 'Not checked out' 8 - Apply patch, restart all 9 - Check the item in again 10 - Note top message has not changed 11 - Note the table now say 'Item was not checked in' and displays the due date and patron info 12 - Note the table also includes the withdrawn value for the item Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
a3fc07806a
commit
f5fcdb83e6
2 changed files with 19 additions and 2 deletions
|
@ -414,9 +414,17 @@ if ($barcode && $op eq 'cud-checkin') {
|
||||||
}
|
}
|
||||||
|
|
||||||
} elsif ( C4::Context->preference('ShowAllCheckins') and !$messages->{'BadBarcode'} and !$needs_confirm and !$bundle_confirm ) {
|
} 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;
|
$returneditems{0} = $barcode;
|
||||||
$riduedate{0} = 0;
|
$riduedate{0} = $duedate;
|
||||||
push( @inputloop, \%input );
|
push( @inputloop, \%input );
|
||||||
}
|
}
|
||||||
$template->param( privacy => $borrower->{privacy} );
|
$template->param( privacy => $borrower->{privacy} );
|
||||||
|
@ -790,6 +798,8 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
|
||||||
next unless $item; # FIXME The item has been deleted in the meantime,
|
next unless $item; # FIXME The item has been deleted in the meantime,
|
||||||
# we could handle that better displaying a message in the template
|
# we could handle that better displaying a message in the template
|
||||||
|
|
||||||
|
|
||||||
|
$ri{not_returned} = 1 unless $returned;
|
||||||
my $biblio = $item->biblio;
|
my $biblio = $item->biblio;
|
||||||
# FIXME pass $item to the template and we are done here...
|
# FIXME pass $item to the template and we are done here...
|
||||||
$ri{itembiblionumber} = $biblio->biblionumber;
|
$ri{itembiblionumber} = $biblio->biblionumber;
|
||||||
|
@ -811,6 +821,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
|
||||||
$ri{homebranch} = $item->homebranch;
|
$ri{homebranch} = $item->homebranch;
|
||||||
$ri{transferbranch} = $item->get_transfer ? $item->get_transfer->tobranch : '';
|
$ri{transferbranch} = $item->get_transfer ? $item->get_transfer->tobranch : '';
|
||||||
$ri{damaged} = $item->damaged;
|
$ri{damaged} = $item->damaged;
|
||||||
|
$ri{withdrawn} = $item->withdrawn;
|
||||||
$ri{transferreason} = $item->get_transfer ? $item->get_transfer->reason : '';
|
$ri{transferreason} = $item->get_transfer ? $item->get_transfer->reason : '';
|
||||||
|
|
||||||
$ri{location} = $item->location;
|
$ri{location} = $item->location;
|
||||||
|
|
|
@ -1254,6 +1254,9 @@
|
||||||
[% FOREACH riloo IN riloop %]
|
[% FOREACH riloo IN riloop %]
|
||||||
<tr>
|
<tr>
|
||||||
<td class="ci-duedate">
|
<td class="ci-duedate">
|
||||||
|
[% IF ( riloo.not_returned ) %]
|
||||||
|
<span class="problem">Item was not checked in</span>
|
||||||
|
[% END %]
|
||||||
[% IF ( riloo.duedate ) %]
|
[% IF ( riloo.duedate ) %]
|
||||||
[% IF ( riloo.return_overdue ) %]
|
[% IF ( riloo.return_overdue ) %]
|
||||||
<span class="overdue">[% riloo.duedate | $KohaDates as_due_date => 1 %] (overdue)</span>
|
<span class="overdue">[% riloo.duedate | $KohaDates as_due_date => 1 %] (overdue)</span>
|
||||||
|
@ -1266,6 +1269,9 @@
|
||||||
[% IF ( riloo.damaged ) %]
|
[% IF ( riloo.damaged ) %]
|
||||||
<span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => riloo.damaged ) | html %]</span>
|
<span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => riloo.damaged ) | html %]</span>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
[% IF ( riloo.withdrawn ) %]
|
||||||
|
<span class="withdrawn">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => riloo.withdrawn ) | html %]</span>
|
||||||
|
[% END %]
|
||||||
</td>
|
</td>
|
||||||
<td class="ci-title">
|
<td class="ci-title">
|
||||||
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber | uri %]">
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber | uri %]">
|
||||||
|
|
Loading…
Reference in a new issue