diff options
-rwxr-xr-x | LedgerSMB.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm index 073a73ab..9f3ac71d 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -434,7 +434,14 @@ sub call_procedure { $query =~ s/\(\)/($argstr)/; my $sth = $self->{dbh}->prepare($query); $sth->execute(@args); + my @types = @{$sth->{TYPE}}; + my @names = @{$sth->{NAME_lc}}; while ( my $ref = $sth->fetchrow_hashref('NAME_lc') ) { + for (0 .. $#names){ + if ($types[$_] eq 'NUMERIC'){ + $ref->{$names[$_]} = Math::BigFloat->new($ref->{$names[$_]}); + } + } push @results, $ref; } @results; |