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

SF.net SVN: ledger-smb:[3938] branches/1.3/bin/aa.pl



Revision: 3938
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3938&view=rev
Author:   tshvr
Date:     2011-10-28 10:03:51 +0000 (Fri, 28 Oct 2011)
Log Message:
-----------
make sure BigFloat numbers stay BigFloat

Modified Paths:
--------------
    branches/1.3/bin/aa.pl

Modified: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl	2011-10-27 22:53:26 UTC (rev 3937)
+++ branches/1.3/bin/aa.pl	2011-10-28 10:03:51 UTC (rev 3938)
@@ -289,7 +289,7 @@
                 $form->{"$form->{ARAP}_paid_$i"} =
 "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
                 $form->{"paid_$i"} =
-                  $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * -1 * $ml;
+                  new Math::BigFloat($form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * -1 * $ml);
                 $form->{"datepaid_$i"} =
                   $form->{acc_trans}{$key}->[ $i - 1 ]->{transdate};
                 $form->{"source_$i"} =
@@ -311,7 +311,7 @@
                     $form->{"${key}_$form->{acc_trans}{$key}->[$i-1]->{accno}"}
                       = "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
                     $form->{"${akey}_$form->{acc_trans}{$key}->[$i-1]->{accno}"}
-                      = $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml;
+                      = new Math::BigFloat( $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml);
 
                     $tax +=
                       $form->{
@@ -325,7 +325,7 @@
 
 
                     $form->{"${akey}_$i"} =
-                      $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml;
+                      new Math::BigFloat($form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml);
 
                     if ( $akey eq 'amount' ) {
                         $form->{"description_$i"} =
@@ -345,8 +345,7 @@
                     }
                     else {
                         $form->{invtotal} =
-                          $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * -1 *
-                          $ml;
+                          new Math::BigFloat($form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * -1 * $ml);
                     }
                     $form->{"${key}_$i"} =
 "$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";

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