diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-27 21:07:50 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-10-27 21:07:50 +0000 |
commit | 5afa8f07125f1246a3b03fd32c0dfe65c6a26b92 (patch) | |
tree | 552d0d58720e1110c1e3f1ff5fb833168480127a /LedgerSMB | |
parent | bc0d73eaf87c65d11b4e00ba0c0dd02ac4ed1c93 (diff) |
Fixed number parsing bug
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@346 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/Form.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 989b4ad9..748c3bd4 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -522,10 +522,10 @@ sub parse_amount { if ($amount =~ s/\((\d*\.?\d*)\)/$1/){ $amount = $1 * -1; } - if ($amount =~ s/(\d*\.?\d*) DR/$1/){ + if ($amount =~ s/(\d*\.?\d*)\s?DR/$1/){ $amount = $1 * -1; } - $amount =~ s/ CR//; + $amount =~ s/\s?CR//; $amount = new Math::BigFloat($amount); return ($amount * 1); } |