Follow-up on fix for Bug 4820, Alter layout of Circulation and fines rules page
[koha_gimpoz] / opac / opac-user.pl
index 3c73b81..634b77a 100755 (executable)
@@ -17,6 +17,7 @@
 
 
 use strict;
+#use warnings; FIXME - Bug 2505
 
 use CGI;
 
@@ -183,6 +184,13 @@ $template->param( branchloop => \@branch_loop );
 my @reserves  = GetReservesFromBorrowernumber( $borrowernumber );
 foreach my $res (@reserves) {
     $res->{'reservedate'} = format_date( $res->{'reservedate'} );
+
+    if ( $res->{'expirationdate'} ne '0000-00-00' ) {
+      $res->{'expirationdate'} = format_date( $res->{'expirationdate'} ) 
+    } else {
+      $res->{'expirationdate'} = '';
+    }
+    
     my $publictype = $res->{'publictype'};
     $res->{$publictype} = 1;
     $res->{'waiting'} = 1 if $res->{'found'} eq 'W';