Kleiner Bug bei Splittbuchungen
authorPhilip Reetz <p.reetz@linet-services.de>
Mon, 16 Jan 2006 13:47:08 +0000 (13:47 +0000)
committerPhilip Reetz <p.reetz@linet-services.de>
Mon, 16 Jan 2006 13:47:08 +0000 (13:47 +0000)
SL/AP.pm
SL/AR.pm

index 8be0c8f..2a486c8 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -142,14 +142,7 @@ sub post_transaction {
 
   # amount for total AP
   $form->{payables} = $form->{invtotal};
-  print(STDERR $form->{payables},
-        " Payables\n",
-        $form->{invtotal},
-        " Invtotal\n",
-        $form->{netamount},
-        " Netamount\n",
-        $form->{total_tax},
-        " Total_Tax\n\n");
+
   my ($query, $sth);
 
   # if we have an id delete old records
index e3e3631..aeb6430 100644 (file)
--- a/SL/AR.pm
+++ b/SL/AR.pm
@@ -113,8 +113,8 @@ sub post_transaction {
         $form->{netamount} += $form->{"amount_$i"};
       } else {
         $form->{"tax_$i"} = $form->{"amount_$i"} * $form->{"taxrate_$i"};
-        $form->{"tax_$i"} =
-          $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
+        $form->{"tax_$i"} = $form->round_amount($form->{"tax_$i"} * $form->{exchangerate}, 2);
+        $form->{netamount} += $form->{"amount_$i"};
       }
     }
     $form->{total_tax} += $form->{"tax_$i"};