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

SF.net SVN: ledger-smb:[3920] branches/1.2/bin



Revision: 3920
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3920&view=rev
Author:   einhverfr
Date:     2011-10-25 05:00:19 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
undoing flawed patch for recent BigFloat issues

Modified Paths:
--------------
    branches/1.2/bin/aa.pl
    branches/1.2/bin/io.pl

Modified: branches/1.2/bin/aa.pl
===================================================================
--- branches/1.2/bin/aa.pl	2011-10-24 23:31:56 UTC (rev 3919)
+++ branches/1.2/bin/aa.pl	2011-10-25 05:00:19 UTC (rev 3920)
@@ -909,11 +909,8 @@
         $count = 0;
         @a     = ();
         for $i ( 1 .. $form->{rowcount} ) {
-            if (!$form->{"amount_$i"}){
-               $form->{"amount_$i"} = "0.00";
-            }
             $form->{"amount_$i"} =
-                 $form->parse_amount( \%myconfig, $form->{"amount_$i"} );
+              $form->parse_amount( \%myconfig, $form->{"amount_$i"} );
             if ( $form->{"amount_$i"} ) {
                 push @a, {};
                 $j = $#a;
@@ -969,9 +966,6 @@
     @taxaccounts = split / /, $form->{taxaccounts};
 
     for (@taxaccounts) {
-        if (!$form->{"tax_$_"}){
-           $form->{"tax_$_"} = '0.00';
-        }
         $form->{"tax_$_"} =
           $form->parse_amount( \%myconfig, $form->{"tax_$_"} );
     }
@@ -985,9 +979,6 @@
                 $form->{"${_}_$j"} = $form->{"${_}_$i"};
             }
             for (qw(paid exchangerate)) {
-                if (!$form->{"${_}_$j"}){
-                   $form->{"${_}_$j"} = '0.00';
-                }
                 $form->{"${_}_$j"} =
                   $form->parse_amount( \%myconfig, $form->{"${_}_$i"} );
             }

Modified: branches/1.2/bin/io.pl
===================================================================
--- branches/1.2/bin/io.pl	2011-10-24 23:31:56 UTC (rev 3919)
+++ branches/1.2/bin/io.pl	2011-10-25 05:00:19 UTC (rev 3920)
@@ -83,11 +83,6 @@
 
 sub _calc_taxes {
     for $i (1 .. $form->{rowcount}){
-        for (qw(sellprice discount qty)){
-            if (!$form->{"${_}_$i"}){
-                $form->{"${_}_$i"} = '0.00';
-            }
-        }
         my $linetotal = 
              $form->round_amount($form->parse_amount(\%myconfig, $form->{"sellprice_$i"}) 
              * (1 - $form->parse_amount(\%myconfig, $form->{"discount_$i"})
@@ -239,7 +234,6 @@
 
         # undo formatting
         for (qw(qty oldqty ship discount sellprice)) {
-            $form->{"${_}_$i"} = '0.00' if ! $form->{"${_}_$i"};
             $form->{"${_}_$i"} =
               $form->parse_amount( \%myconfig, $form->{"${_}_$i"} );
         }
@@ -641,7 +635,6 @@
                 $form->{"adj_$i"} = 1;
 
                 for (qw(sellprice listprice weight)) {
-                    $form->{$_} = '0.00' unless $form->{$_};
                     $form->{$_} =
                       $form->parse_amount( \%myconfig, $form->{$_} );
                 }
@@ -1024,10 +1017,6 @@
     my ( $amount, $sellprice, $discount, $qty );
 
     for $i ( 1 .. $form->{rowcount} ) {
-        $form->{"sellprice_$i"} = '0.00' unless $form->{"sellprice_$i"};
-        $form->{"discount_$i"}  = '0.00' unless $form->{"discount_$i"};
-        $form->{"qty_$i"}       = '0.00' unless $form->{"qty_$i"};
-
         $sellprice = $form->parse_amount( \%myconfig, $form->{"sellprice_$i"} );
         $discount  = $form->parse_amount( \%myconfig, $form->{"discount_$i"} );
         $qty       = $form->parse_amount( \%myconfig, $form->{"qty_$i"} );
@@ -1822,7 +1811,6 @@
 
         for $i ( 1 .. $form->{paidaccounts} ) {
             for (qw(paid exchangerate)) {
-                $form->{"${_}_$i"} = '0.00' unless $form->{"${_}_$i"};
                 $form->{"${_}_$i"} =
                   $form->parse_amount( \%myconfig, $form->{"${_}_$i"} );
             }

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