Bug 2505 : Switch on warnings in circ/returns.pl
[koha.git] / opac / opac-account.pl
index 43a1e0c..673b70e 100755 (executable)
@@ -24,7 +24,6 @@ use C4::Members;
 use C4::Circulation;
 use C4::Auth;
 use C4::Output;
-use C4::Dates qw/format_date/;
 use warnings;
 
 my $query = new CGI;
@@ -50,13 +49,12 @@ $template->param( BORROWER_INFO => \@bordat );
 my ( $total , $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
 
 for ( my $i = 0 ; $i < $numaccts ; $i++ ) {
-    $accts->[$i]{'date'} = format_date( $accts->[$i]{'date'} );
-    $accts->[$i]{'amount'} = sprintf( "%.2f", $accts->[$i]{'amount'} );
+    $accts->[$i]{'amount'} = sprintf( "%.2f", $accts->[$i]{'amount'} || '0.00');
     if ( $accts->[$i]{'amount'} >= 0 ) {
         $accts->[$i]{'amountcredit'} = 1;
     }
     $accts->[$i]{'amountoutstanding'} =
-      sprintf( "%.2f", $accts->[$i]{'amountoutstanding'} );
+      sprintf( "%.2f", $accts->[$i]{'amountoutstanding'} || '0.00' );
     if ( $accts->[$i]{'amountoutstanding'} >= 0 ) {
         $accts->[$i]{'amountoutstandingcredit'} = 1;
     }