From 8e32f2881a277ab045dd78a7244adf645e71f2fb Mon Sep 17 00:00:00 2001 From: oleonard Date: Wed, 16 Feb 2005 19:17:15 +0000 Subject: [PATCH] Formatting currency values --- pay.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pay.pl b/pay.pl index f3de382b0e..68f8ad5ea8 100755 --- a/pay.pl +++ b/pay.pl @@ -101,8 +101,8 @@ if ($check ==0){ $line{i}=$i; $line{itemnumber} = $accts->[$i]{'itemnumber'}; $line{accounttype} = $accts->[$i]{'accounttype'}; - $line{amount} = $accts->[$i]{'amount'}; - $line{amountoutstanding} = $accts->[$i]{'amountoutstanding'}; + $line{amount} = sprintf("%.2f",$accts->[$i]{'amount'}); + $line{amountoutstanding} = sprintf("%.2f",$accts->[$i]{'amountoutstanding'}); $line{bornum} = $bornum; $line{accountno} = $accts->[$i]{'accountno'}; $line{description} = $accts->[$i]{'description'}; @@ -114,7 +114,7 @@ if ($check ==0){ surname => $data->{'surname'}, bornum => $bornum, loop_pay => \@loop_pay, - total => $total); + total => sprintf("%.2f",$total)); print "Content-Type: text/html\n\n", $template->output; } else { -- 2.39.5