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

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



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

Log Message:
-----------
Added (n) handling to parse_mamount

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

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2006-10-27 17:04:26 UTC (rev 334)
+++ trunk/LedgerSMB/Form.pm	2006-10-27 17:25:13 UTC (rev 335)
@@ -501,6 +501,7 @@
 	}
 	my $numberformat = $myconfig->{numberformat};
 
+
 	if (($numberformat eq '1.000,00') ||
 		($numberformat eq '1000,00')) {
 
@@ -515,7 +516,11 @@
 		$amount =~ s/'//g;
 	}
 
+
 	$amount =~ s/,//g;
+	if ($amount =~ s/\((\d+)\)/$1/){
+		$amount *= -1;
+	}
 	$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.