X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7d29de1cc9bf5d7547f387441b72f80b0edba0fe..8edb2ea1ebaa8cb4961aba4e9b5dd96c0191d338:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index ff7d0efa0..539cd9cb2 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -878,7 +878,7 @@ sub format_amount { # this is easy to confuse, so keep in mind: before this comment no s///, m//, concat or other strong ops on # $amount. after this comment no +,-,*,/,abs. it will only introduce subtle bugs. - $amount =~ s/0*$//; # cull trailing 0s + $amount =~ s/0*$// unless defined $places && $places == 0; # cull trailing 0s my @d = map { s/\d//g; reverse split // } my $tmp = $myconfig->{numberformat}; # get delim chars my @p = split(/\./, $amount); # split amount at decimal point