From 2177562ecf64a76bb069009358a843bb80e78a41 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 13 Oct 2011 14:44:18 -0400 Subject: [PATCH] Bug 3385 - Add checkout date and renewal date to display list of checked out items This patch doesn't fix the origial request to add the renewal date to the list of checked out items, but follows the other bug commenter's suggestion that the information be added to the item details page (moredetail.pl). The other part of this request, to add the checkout date, has already been fixed by another patch. Signed-off-by: Chris Cormack Signed-off-by: Paul Poulain --- C4/Items.pm | 1 + catalogue/moredetail.pl | 4 +--- .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 0b91b6530a..0756832232 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1214,6 +1214,7 @@ sub GetItemsInfo { $data->{cardnumber} = $idata->{cardnumber}; $data->{surname} = $idata->{surname}; $data->{firstname} = $idata->{firstname}; + $data->{lastreneweddate} = $idata->{lastreneweddate}; $datedue = $idata->{'date_due'}; if (C4::Context->preference("IndependantBranches")){ my $userenv = C4::Context->userenv; diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 47e1adff10..68af91c73d 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -128,9 +128,7 @@ foreach my $item (@items){ $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes); $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'description'}; $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} ); - $item->{'datelastborrowed'} = format_date( $item->{'datelastborrowed'} ); - $item->{'dateaccessioned'} = format_date( $item->{'dateaccessioned'} ); - $item->{'datelastseen'} = format_date( $item->{'datelastseen'} ); + $item->{$_} = format_date( $item->{$_} ) foreach qw/datelastborrowed dateaccessioned datelastseen lastreneweddate/; $item->{'copyvol'} = $item->{'copynumber'}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 36e7149d48..a79fde66e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -67,7 +67,7 @@
  1. Current Location: [% ITEM_DAT.holdingbranchname %] 
  2. -
  3. Checkout Status: [% IF ( ITEM_DAT.issue ) %]Checked out to [% ITEM_DAT.cardnumber %], Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]
  4. +
  5. Checkout Status: [% IF ( ITEM_DAT.issue ) %]Checked out to [% ITEM_DAT.cardnumber %][% IF ( ITEM_DAT.lastreneweddate ) %], Last renewed [% ITEM_DAT.lastreneweddate %][% END %], Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]
  6. Current Renewals: [% ITEM_DAT.renewals %] 
  7. [% IF ( ITEM_DAT.itemlostloop ) %]
  8. Lost Status: -- 2.20.1