From c00273147a2d400779fcdaf34f171b2180faa453 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 21 Dec 2001 21:40:24 +0000 Subject: add name/address to post payment screen get rid of some $-0.00 yay for ieee fp --- httemplate/view/cust_main.cgi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'httemplate/view/cust_main.cgi') 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 @@ <% -# +# 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 "",time2str("%D",$date),"", "$desc", @@ -485,7 +487,7 @@ foreach $item (sort keyfield_numerically @history) { "", ( $refund ? "\$".sprintf("%.2f",$refund) : '' ), "", - "\$" . sprintf("%.2f",$balance), + "\$" . $balance, "", "\n"; } -- cgit v1.2.1