[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [346] trunk/LedgerSMB/Form.pm



Revision: 346
          http://svn.sourceforge.net/ledger-smb/?rev=346&view=rev
Author:   einhverfr
Date:     2006-10-27 14:07:50 -0700 (Fri, 27 Oct 2006)

Log Message:
-----------
Fixed number parsing bug

Modified Paths:
--------------
    trunk/LedgerSMB/Form.pm

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2006-10-27 21:05:19 UTC (rev 345)
+++ trunk/LedgerSMB/Form.pm	2006-10-27 21:07:50 UTC (rev 346)
@@ -522,10 +522,10 @@
 	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);
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.