summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-14 18:02:20 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-05-14 18:02:20 +0000
commit7a2bf913ba33bfd388f19fb157d89f6d567445b1 (patch)
treeec4b4c38558f5dfff2dea29a53ea2821470bbf2c
parent5e0260791c23c5c2459c7be1bc17e38216565239 (diff)
Fixing more number double parsing bugs
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1187 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/CA.pm15
1 files changed, 11 insertions, 4 deletions
diff --git a/LedgerSMB/CA.pm b/LedgerSMB/CA.pm
index b182e6d0..61df47fd 100644
--- a/LedgerSMB/CA.pm
+++ b/LedgerSMB/CA.pm
@@ -53,6 +53,7 @@ sub all_accounts {
$sth->execute || $form->dberror($query);
while ( my $ref = $sth->fetchrow_hashref(NAME_lc) ) {
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ref);
$amount{ $ref->{accno} } = $ref->{amount};
}
@@ -317,7 +318,9 @@ sub all_transactions {
$sth = $dbh->prepare($query);
$sth->execute(@queryargs);
- ( $form->{balance} ) = $sth->fetchrow_array;
+ my @balance = $sth->fetchrow_array;
+ $form->db_parse_numeric(sth=>$sth, arrayref=>\@balance);
+ ( $form->{balance} ) = @balance;
$sth->finish;
@queryargs = ();
}
@@ -455,7 +458,7 @@ sub all_transactions {
my %accno;
while ( my $ca = $sth->fetchrow_hashref(NAME_lc) ) {
-
+ $form->db_parse_numeric(sth=>$sth, hashref=>$ca);
# gl
if ( $ca->{module} eq "gl" ) {
$ca->{module} = "gl";
@@ -482,7 +485,9 @@ sub all_transactions {
$dr->execute( $ca->{id} );
$ca->{accno} = ();
- while ( ( $chart_id, $accno ) = $dr->fetchrow_array ) {
+ while ( my @dr_results = $dr->fetchrow_array ) {
+ $form->db_parse_numeric(sth=>$dr, arrayref=>\@dr_results);
+ ($chart_id, $accno) = @dr_results;
$accno{$accno} = 1 if $chart_id ne $ca->{chart_id};
}
@@ -499,7 +504,9 @@ sub all_transactions {
$cr->execute( $ca->{id} );
$ca->{accno} = ();
- while ( ( $chart_id, $accno ) = $cr->fetchrow_array ) {
+ while ( my @cr_results = $cr->fetchrow_array ) {
+ $form->db_parse_numeric(sth=>$cr, arrayref=>\@cr_results);
+ ($chart_id, $accno) = @cr_results;
$accno{$accno} = 1 if $chart_id ne $ca->{chart_id};
}