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

SF.net SVN: ledger-smb: [727] branches/1.2/LedgerSMB/Form.pm



Revision: 727
          http://svn.sourceforge.net/ledger-smb/?rev=727&view=rev
Author:   einhverfr
Date:     2006-12-05 15:20:30 -0800 (Tue, 05 Dec 2006)

Log Message:
-----------
Minor change to parse_amount which allow returning zero on undef or empty string (necessary for some things)

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Form.pm

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2006-12-05 23:13:22 UTC (rev 726)
+++ branches/1.2/LedgerSMB/Form.pm	2006-12-05 23:20:30 UTC (rev 727)
@@ -479,8 +479,8 @@
 
 	my ($self, $myconfig, $amount) = @_;
 
-	if ($amount eq '') {
-		return undef;
+	if (($amount eq '') or ($amount eq undef)) {
+		return 0;
 	}
 
 	if (UNIVERSAL::isa($amount, 'Math::BigFloat')){ # Amount may not be an object	


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