diff options
author | ivan <ivan> | 2001-12-21 21:40:24 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-12-21 21:40:24 +0000 |
commit | c00273147a2d400779fcdaf34f171b2180faa453 (patch) | |
tree | cf8b9a0a245162d5493144c94ed88ba86056c8d8 /httemplate/view/cust_main.cgi | |
parent | 29a315f2dc4187e5558315f76c3d27d11e287620 (diff) |
add name/address to post payment screen
get rid of some $-0.00 yay for ieee fp
Diffstat (limited to 'httemplate/view/cust_main.cgi')
-rwxr-xr-x | httemplate/view/cust_main.cgi | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index d43575a9a..b17c9277a 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -1,5 +1,5 @@ <% -#<!-- $Id: cust_main.cgi,v 1.14 2001-10-30 14:54:07 ivan Exp $ --> +#<!-- $Id: cust_main.cgi,v 1.15 2001-12-21 21:40:24 ivan Exp $ --> use strict; use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral @@ -470,6 +470,8 @@ foreach $item (sort keyfield_numerically @history) { $refund ||= 0; $balance += $charge - $payment; $balance -= $credit - $refund; + $balance = sprintf("%.2f", $balance); + $balance =~ s/^\-0\.00$/0.00/; #yay ieee fp print "<TR><TD><FONT SIZE=-1>",time2str("%D",$date),"</FONT></TD>", "<TD><FONT SIZE=-1>$desc</FONT></TD>", @@ -485,7 +487,7 @@ foreach $item (sort keyfield_numerically @history) { "<TD><FONT SIZE=-1>", ( $refund ? "\$".sprintf("%.2f",$refund) : '' ), "</FONT></TD>", - "<TD><FONT SIZE=-1>\$" . sprintf("%.2f",$balance), + "<TD><FONT SIZE=-1>\$" . $balance, "</FONT></TD>", "\n"; } |