diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-31 22:07:32 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-31 22:07:32 +0000 |
commit | dbf1efaa612d24c3f3520a75de0155ca698b8673 (patch) | |
tree | 794288dcd4ad394a8111c5ad860dbe5d0c0bd059 /LedgerSMB | |
parent | 50976eed0c12a2cb45944d0818b63a7c65885afb (diff) |
Get db_parse_numeric to recognise float4/real as a "numeric" type.
Fixes problems with discount retreival on invoices.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1831 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r-- | LedgerSMB/Form.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 7cceffea..9e7c7748 100644 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -856,7 +856,8 @@ sub db_parse_numeric { my @types = @{$sth->{TYPE}}; my @names = @{$sth->{NAME_lc}}; for (0 .. $#names){ - if ($types[$_] == 3){ + # numeric float4/real + if ($types[$_] == 3 or $types[$_] ==2) { $arrayref->[$_] = Math::BigFloat->new($arrayref->[$_]) if defined $arrayref; $hashref->{$names[$_]} = Math::BigFloat->new($hashref->{$names[$_]}) |