[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3939] branches/1.3/bin/aa.pl
- Subject: SF.net SVN: ledger-smb:[3939] branches/1.3/bin/aa.pl
- From: ..hidden..
- Date: Fri, 28 Oct 2011 10:19:17 +0000
Revision: 3939
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3939&view=rev
Author: tshvr
Date: 2011-10-28 10:19:17 +0000 (Fri, 28 Oct 2011)
Log Message:
-----------
make sure BigFloat numbers stay BigFloat, better solution
Modified Paths:
--------------
branches/1.3/bin/aa.pl
Modified: branches/1.3/bin/aa.pl
===================================================================
--- branches/1.3/bin/aa.pl 2011-10-28 10:03:51 UTC (rev 3938)
+++ branches/1.3/bin/aa.pl 2011-10-28 10:19:17 UTC (rev 3939)
@@ -269,7 +269,8 @@
$netamount = 0;
$tax = 0;
$taxrate = 0;
- $ml = ( $form->{ARAP} eq 'AR' ) ? 1 : -1;
+ #$ml = ( $form->{ARAP} eq 'AR' ) ? 1 : -1;
+ $ml = new Math::BigFloat( ( $form->{ARAP} eq 'AR' ) ? 1 : -1);
foreach $key ( keys %{ $form->{"$form->{ARAP}_links"} } ) {
@@ -289,7 +290,7 @@
$form->{"$form->{ARAP}_paid_$i"} =
"$form->{acc_trans}{$key}->[$i-1]->{accno}--$form->{acc_trans}{$key}->[$i-1]->{description}";
$form->{"paid_$i"} =
- new Math::BigFloat($form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * -1 * $ml);
+ $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * -1 * $ml;
$form->{"datepaid_$i"} =
$form->{acc_trans}{$key}->[ $i - 1 ]->{transdate};
$form->{"source_$i"} =
@@ -311,7 +312,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}"}
- = new Math::BigFloat( $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml);
+ = $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml;
$tax +=
$form->{
@@ -325,7 +326,7 @@
$form->{"${akey}_$i"} =
- new Math::BigFloat($form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml);
+ $form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * $ml;
if ( $akey eq 'amount' ) {
$form->{"description_$i"} =
@@ -345,7 +346,7 @@
}
else {
$form->{invtotal} =
- new Math::BigFloat($form->{acc_trans}{$key}->[ $i - 1 ]->{amount} * -1 * $ml);
+ $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.