From dbf1efaa612d24c3f3520a75de0155ca698b8673 Mon Sep 17 00:00:00 2001 From: tetragon Date: Wed, 31 Oct 2007 22:07:32 +0000 Subject: 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 --- LedgerSMB.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'LedgerSMB.pm') diff --git a/LedgerSMB.pm b/LedgerSMB.pm index 99a3d994..d2eeb9bc 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -555,7 +555,8 @@ sub call_procedure { my @names = @{$sth->{NAME_lc}}; while ( my $ref = $sth->fetchrow_hashref('NAME_lc') ) { for (0 .. $#names){ - if ($types[$_] == 3){ + # numeric float4/real + if ($types[$_] == 3 or $types[$_] == 2) { $ref->{$names[$_]} = Math::BigFloat->new($ref->{$names[$_]}); } } -- cgit v1.2.3