From: Garry Collum Date: Mon, 15 Feb 2010 22:44:47 +0000 (-0500) Subject: Bug 4192: Fixes warnings generated by opac-account.pl. X-Git-Tag: v3.02.00-alpha2~374 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=90fc2ef1e88b3b52f7e8493b42de099b3df839ba;p=koha.git Bug 4192: Fixes warnings generated by opac-account.pl. Signed-off-by: Galen Charlton --- 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; }