From 90fc2ef1e88b3b52f7e8493b42de099b3df839ba Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Mon, 15 Feb 2010 17:44:47 -0500 Subject: [PATCH] Bug 4192: Fixes warnings generated by opac-account.pl. Signed-off-by: Galen Charlton --- opac/opac-account.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-account.pl b/opac/opac-account.pl index 43a1e0cd50..22d83b8392 100755 --- a/opac/opac-account.pl +++ b/opac/opac-account.pl @@ -51,12 +51,12 @@ 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; } -- 2.20.1