From: wbudic Date: Wed, 7 Nov 2018 05:56:56 +0000 (+1100) Subject: Money amount formatting. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=087bcf89daac6f922d5698e50f8ee0b24287302a;p=LifeLog.git Money amount formatting. --- diff --git a/htdocs/cgi-bin/main.cgi b/htdocs/cgi-bin/main.cgi index 043ae44..f94decc 100755 --- a/htdocs/cgi-bin/main.cgi +++ b/htdocs/cgi-bin/main.cgi @@ -117,7 +117,7 @@ if($tbl_start>0){ my $ct = $hshCats{$row[1]}; my $dt = DateTime::Format::SQLite->parse_datetime( $row[2] ); my $log = $row[3]; - my $amm = $row[4]; + my $amm = sprintf "%.2f", $row[4]; #Apostrophe in the log value is doubled to avoid SQL errors. $log =~ s/''/'/g;