From dd8034c960564d63e01afabaeed83370c6389838 Mon Sep 17 00:00:00 2001 From: tetragon Date: Tue, 13 Nov 2007 18:40:47 +0000 Subject: Fixing bug 1831246. Caused by both a bug in db_parse_numeric and bad args in LedgerSMB/RC.pm for arrays git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1864 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 2 +- LedgerSMB/RC.pm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 26dbd40b..34ca7187 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -599,7 +599,7 @@ sub db_parse_numeric { for (0 .. $#names) { # numeric real/float4 if ($types[$_] == 3 or $types[$_] == 2){ - $arrayref[$_] = Math::BigFloat->new($arrayref[$_]) + $arrayref->[$_] = Math::BigFloat->new($arrayref->[$_]) if defined $arrayref; $hashref->{$names[$_]} = Math::BigFloat->new($hashref->{$names[$_]}) if defined $hashref; diff --git a/LedgerSMB/RC.pm b/LedgerSMB/RC.pm index 63558b49..592f2234 100755 --- a/LedgerSMB/RC.pm +++ b/LedgerSMB/RC.pm @@ -166,7 +166,7 @@ sub payment_transactions { $sth = $dbh->prepare($query); $sth->execute( $form->{accno} ); my @balancelist = $sth->fetchrow_array(); - $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist); + $form->db_parse_numeric(sth=>$sth, arrayref=>\@balancelist); ( $form->{beginningbalance} ) = @balancelist; $query = qq| @@ -179,7 +179,7 @@ sub payment_transactions { $sth = $dbh->prepare($query); $sth->execute( $form->{accno} ); @balancelist = $sth->fetchrow_array(); - $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist); + $form->db_parse_numeric(sth=>$sth, arrayref=>\@balancelist); ( $form->{fx_balance} ) = @balancelist; $transdate = ""; @@ -198,7 +198,7 @@ sub payment_transactions { $sth = $dbh->prepare($query); $sth->execute( $form->{accno} ); @balancelist = $sth->fetchrow_array(); - $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist); + $form->db_parse_numeric(sth=>$sth, arrayref=>\@balancelist); ( $form->{endingbalance} ) = @balancelist; # fx balance @@ -211,7 +211,7 @@ sub payment_transactions { $sth = $dbh->prepare($query); $sth->execute( $form->{accno} ); @balancelist = $sth->fetchrow_array(); - $form->db_parse_numeric(sth=>$sth, arraylist=>\@balancelist); + $form->db_parse_numeric(sth=>$sth, arrayref=>\@balancelist); ( $form->{fx_endingbalance} ) = @balancelist; $cleared = qq| AND ac.cleared = '0'| unless $form->{fromdate}; -- cgit v1.2.3