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

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



Revision: 1081
          http://svn.sourceforge.net/ledger-smb/?rev=1081&view=rev
Author:   einhverfr
Date:     2007-04-17 15:17:15 -0700 (Tue, 17 Apr 2007)

Log Message:
-----------
Fixing sales tax display issue

Modified Paths:
--------------
    branches/1.2/bin/ir.pl
    branches/1.2/bin/is.pl
    branches/1.2/bin/oe.pl

Modified: branches/1.2/bin/ir.pl
===================================================================
--- branches/1.2/bin/ir.pl	2007-04-17 21:44:27 UTC (rev 1080)
+++ branches/1.2/bin/ir.pl	2007-04-17 22:17:15 UTC (rev 1081)
@@ -484,12 +484,13 @@
 
     if ( !$form->{taxincluded} ) {
         my @taxset = Tax::init_taxes( $form, $form->{taxaccounts} );
-        $form->{invtotal} +=
-          $form->round_amount(
-            Tax::calculate_taxes( ..hidden.., $form, $form->{invsubtotal}, 0 ),
-            2 );
         foreach $taxobj (@taxset) {
             $item = $taxobj->account;
+	    $form->{invtotal} += $form->round_amount(
+                $form->{"${item}_rate"} * $form->{"${item}_base"}, 2);
+            $form->{"${item}_total"} =
+              $form->format_amount( \%myconfig,
+                $form->{"${item}_rate"} * $form->{"${item}_base"}, 2 );
             if ( $form->{"${item}_base"} ) {
                 $form->{"${item}_total"} =
                   $form->format_amount( \%myconfig,

Modified: branches/1.2/bin/is.pl
===================================================================
--- branches/1.2/bin/is.pl	2007-04-17 21:44:27 UTC (rev 1080)
+++ branches/1.2/bin/is.pl	2007-04-17 22:17:15 UTC (rev 1081)
@@ -540,10 +540,10 @@
 
     if ( !$form->{taxincluded} ) {
         my @taxes = Tax::init_taxes( $form, $form->{taxaccounts} );
-        $form->{invtotal} +=
-          Tax::calculate_taxes( ..hidden.., $form, $form->{invsubtotal}, 0 );
         foreach $item (@taxes) {
             my $taccno = $item->account;
+	    $form->{invtotal} += $form->round_amount( 
+                $form->{"${taccno}_rate"} * $form->{"${taccno}_base"}, 2);
             $form->{"${taccno}_total"} =
               $form->format_amount( \%myconfig,
                 $form->{"${taccno}_rate"} * $form->{"${taccno}_base"}, 2 );
@@ -552,7 +552,7 @@
       	<th align=right>$form->{"${taccno}_description"}</th>
       	<td align=right>$form->{"${taccno}_total"}</td>
         </tr>
-	| if $item->value;
+	| if $form->{"${taccno}_base"};
         }
 
         $form->{invsubtotal} =

Modified: branches/1.2/bin/oe.pl
===================================================================
--- branches/1.2/bin/oe.pl	2007-04-17 21:44:27 UTC (rev 1080)
+++ branches/1.2/bin/oe.pl	2007-04-17 22:17:15 UTC (rev 1081)
@@ -682,10 +682,10 @@
     if ( !$form->{taxincluded} ) {
 
         my @taxes = Tax::init_taxes( $form, $form->{taxaccounts} );
-        $form->{invtotal} +=
-          Tax::calculate_taxes( ..hidden.., $form, $form->{invsubtotal}, 0 );
         foreach my $item (@taxes) {
             my $taccno = $item->account;
+	    $form->{invtotal} += $form->round_amount( 
+                $form->{"${taccno}_rate"} * $form->{"${taccno}_base"}, 2);
             $form->{"${taccno}_total"} =
               $form->format_amount( \%myconfig,
                 $form->{"${taccno}_rate"} * $form->{"${taccno}_base"}, 2 );
@@ -695,7 +695,7 @@
 		<th align=right>$form->{"${taccno}_description"}</th>
 		<td align=right>$form->{"${taccno}_total"}</td>
 	      </tr>
-	      | if $item->value;
+	      | if $form->{"${taccno}_base"};
         }
 
         $form->{invsubtotal} =


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