diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-13 18:40:47 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-13 18:40:47 +0000 |
commit | dd8034c960564d63e01afabaeed83370c6389838 (patch) | |
tree | e5e3ea996b8bc040c60b11841e33c5fbe419b87c | |
parent | 2b4ec03f194111cccb574579930a8f0641c3581e (diff) |
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
-rwxr-xr-x | LedgerSMB/Form.pm | 2 | ||||
-rwxr-xr-x | LedgerSMB/RC.pm | 8 |
2 files changed, 5 insertions, 5 deletions
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}; |