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

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



Revision: 337
          http://svn.sourceforge.net/ledger-smb/?rev=337&view=rev
Author:   tetragon
Date:     2006-10-27 10:56:09 -0700 (Fri, 27 Oct 2006)

Log Message:
-----------
Fix parsing of (n.m) form in parse_amount

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

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2006-10-27 17:49:12 UTC (rev 336)
+++ trunk/LedgerSMB/Form.pm	2006-10-27 17:56:09 UTC (rev 337)
@@ -518,7 +518,7 @@
 
 
 	$amount =~ s/,//g;
-	if ($amount =~ s/\((\d+)\)/$1/){
+	if ($amount =~ s/\((\d+.?\d*)\)/$1/){
 		$amount *= -1;
 	}
 	$amount = new Math::BigFloat($amount);


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