Bug 3385 - Add checkout date and renewal date to display list of checked out items
authorOwen Leonard <oleonard@myacpl.org>
Thu, 13 Oct 2011 18:44:18 +0000 (14:44 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 6 Dec 2011 18:22:01 +0000 (19:22 +0100)
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 <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Items.pm
catalogue/moredetail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt

index 0b91b65..0756832 100644 (file)
@@ -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;
index 47e1adf..68af91c 100755 (executable)
@@ -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'};
 
 
index 36e7149..a79fde6 100644 (file)
@@ -67,7 +67,7 @@
 
             <ol class="bibliodetails">
             <li><span class="label">Current Location:</span> [% ITEM_DAT.holdingbranchname %]&nbsp;</li>
-            <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>, Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]</li>
+            <li><span class="label">Checkout Status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>[% IF ( ITEM_DAT.lastreneweddate ) %], Last renewed [% ITEM_DAT.lastreneweddate %][% END %], Due back on [% ITEM_DAT.datedue %][% ELSE %]Not Checked out [% END %]</li>
             <li><span class="label">Current Renewals:</span> [% ITEM_DAT.renewals %]&nbsp;</li>
             [% IF ( ITEM_DAT.itemlostloop ) %]
                 <li><span class="label">Lost Status:</span>