Revision 74f245fb
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
957 | 957 |
sub round_amount { |
958 | 958 |
my ($self, $amount, $places) = @_; |
959 | 959 |
|
960 |
return 0 if !defined $amount; |
|
961 |
|
|
960 | 962 |
# We use Perl's knowledge of string representation for |
961 | 963 |
# rounding. First, convert the floating point number to a string |
962 | 964 |
# with a high number of places. Then split the string on the decimal |
Auch abrufbar als: Unified diff
parse_amount: Bei amount undef sofort 0 zurückgeben.