[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1864] branches/1.2/LedgerSMB



Revision: 1864
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1864&view=rev
Author:   tetragon
Date:     2007-11-13 10:40:47 -0800 (Tue, 13 Nov 2007)

Log Message:
-----------
Fixing bug 1831246.  Caused by both a bug in db_parse_numeric and bad args in
LedgerSMB/RC.pm for arrays

Modified Paths:
--------------
    branches/1.2/LedgerSMB/Form.pm
    branches/1.2/LedgerSMB/RC.pm

Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm	2007-11-12 04:14:09 UTC (rev 1863)
+++ branches/1.2/LedgerSMB/Form.pm	2007-11-13 18:40:47 UTC (rev 1864)
@@ -599,7 +599,7 @@
     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;

Modified: branches/1.2/LedgerSMB/RC.pm
===================================================================
--- branches/1.2/LedgerSMB/RC.pm	2007-11-12 04:14:09 UTC (rev 1863)
+++ branches/1.2/LedgerSMB/RC.pm	2007-11-13 18:40:47 UTC (rev 1864)
@@ -166,7 +166,7 @@
     $sth = $dbh->prepare($query);
     $sth->execute( $form->{accno} );
     my @balancelist = $sth->fetchrow_array();
-    $form->db_parse_numeric(sth=>$sth, arraylist=>..hidden..);
+    $form->db_parse_numeric(sth=>$sth, arrayref=>..hidden..);
     ( $form->{beginningbalance} ) = @balancelist;
 
     $query = qq|
@@ -179,7 +179,7 @@
     $sth = $dbh->prepare($query);
     $sth->execute( $form->{accno} );
     @balancelist = $sth->fetchrow_array();
-    $form->db_parse_numeric(sth=>$sth, arraylist=>..hidden..);
+    $form->db_parse_numeric(sth=>$sth, arrayref=>..hidden..);
     ( $form->{fx_balance} ) = @balancelist;
 
     $transdate = "";
@@ -198,7 +198,7 @@
     $sth = $dbh->prepare($query);
     $sth->execute( $form->{accno} );
     @balancelist = $sth->fetchrow_array();
-    $form->db_parse_numeric(sth=>$sth, arraylist=>..hidden..);
+    $form->db_parse_numeric(sth=>$sth, arrayref=>..hidden..);
     ( $form->{endingbalance} ) = @balancelist;
 
     # fx balance
@@ -211,7 +211,7 @@
     $sth = $dbh->prepare($query);
     $sth->execute( $form->{accno} );
     @balancelist = $sth->fetchrow_array();
-    $form->db_parse_numeric(sth=>$sth, arraylist=>..hidden..);
+    $form->db_parse_numeric(sth=>$sth, arrayref=>..hidden..);
     ( $form->{fx_endingbalance} ) = @balancelist;
 
     $cleared = qq| AND ac.cleared = '0'| unless $form->{fromdate};


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.