From 5afa8f07125f1246a3b03fd32c0dfe65c6a26b92 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 27 Oct 2006 21:07:50 +0000 Subject: Fixed number parsing bug git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@346 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 4 ++-- 1 file 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); } -- cgit v1.2.3