summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-27 17:25:13 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-27 17:25:13 +0000
commit934b46358fb4ee2d001d725215c5fb0d0f8943ac (patch)
tree9b74d15db91d1d12fc9b66a3e2000f06589eda01 /LedgerSMB
parent9c3fdc890420daf1977b618cba174ae2ea52b0ff (diff)
Added (n) handling to parse_mamount
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@335 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/Form.pm5
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);
}