diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-05 23:20:30 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-12-05 23:20:30 +0000 |
commit | 4b72b21a945ca894f6f5f9d761498bfa5ff00f75 (patch) | |
tree | dc36a9e5b9cc3fd5430f2065f7b231f427fde0b2 | |
parent | 75debecc210de2bbc7d8d4cbe70f5e95d9ce1b1e (diff) |
Minor change to parse_amount which allow returning zero on undef or empty string (necessary for some things)
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@727 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/Form.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 2ff0be22..cf89c9e7 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -479,8 +479,8 @@ sub parse_amount { 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 |