summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xLedgerSMB/Form.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index 3422e2ac..26dbd40b 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -594,10 +594,11 @@ sub db_parse_numeric {
my %args = @_;
my ($sth, $arrayref, $hashref) = ($args{sth}, $args{arrayref},
$args{hashref});
- my @types = @{$sth->{TYPE}};
- my @names = @{$sth->{NAME_lc}};
- for (0 .. $#names){
- if ($types[$_] == 3){
+ my @types = @{$sth->{'TYPE'}};
+ my @names = @{$sth->{'NAME_lc'}};
+ for (0 .. $#names) {
+ # numeric real/float4
+ if ($types[$_] == 3 or $types[$_] == 2){
$arrayref[$_] = Math::BigFloat->new($arrayref[$_])
if defined $arrayref;
$hashref->{$names[$_]} = Math::BigFloat->new($hashref->{$names[$_]})