Revision 8edb2ea1
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
878 | 878 |
# this is easy to confuse, so keep in mind: before this comment no s///, m//, concat or other strong ops on |
879 | 879 |
# $amount. after this comment no +,-,*,/,abs. it will only introduce subtle bugs. |
880 | 880 |
|
881 |
$amount =~ s/0*$//; # cull trailing 0s
|
|
881 |
$amount =~ s/0*$// unless defined $places && $places == 0; # cull trailing 0s
|
|
882 | 882 |
|
883 | 883 |
my @d = map { s/\d//g; reverse split // } my $tmp = $myconfig->{numberformat}; # get delim chars |
884 | 884 |
my @p = split(/\./, $amount); # split amount at decimal point |
Auch abrufbar als: Unified diff
format_amount bug: Bei places == 0 wurden trailing 0 abgeschnitten