diff options
-rwxr-xr-x | LedgerSMB/Form.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index c15cdcbc..9dd6f237 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -501,6 +501,7 @@ sub parse_amount { } my $numberformat = $myconfig->{numberformat}; + if (($numberformat eq '1.000,00') || ($numberformat eq '1000,00')) { @@ -515,7 +516,11 @@ sub parse_amount { $amount =~ s/'//g; } + $amount =~ s/,//g; + if ($amount =~ s/\((\d+)\)/$1/){ + $amount *= -1; + } $amount = new Math::BigFloat($amount); return ($amount * 1); } |