Ueber die Variable <%tax_rate%> kann nun in den Druckvorlagen der Steuersatz einer...
[kivitendo-erp.git] / SL / RP.pm
index 7bd324b..5bc2b4e 100644 (file)
--- a/SL/RP.pm
+++ b/SL/RP.pm
@@ -2343,6 +2343,10 @@ sub bwa {
   foreach $key (@periods) {
     $form->{ "$key" . "gesamtleistung" } = 0;
     $form->{ "$key" . "gesamtkosten" }   = 0;
+    foreach $kosten (@gesamtkosten) {
+      $form->{$kosten}{$key} *= -1;
+    }
+    $form->{4}{$key} *= -1;
 
     foreach $category (@categories) {
 
@@ -2357,6 +2361,7 @@ sub bwa {
       $form->{ "$key" . "gesamtleistung" } += $form->{$item}{$key};
     }
     foreach $item (@gesamtkosten) {
+      $form->{$item}{$key} *= -1;
       $form->{ "$key" . "gesamtkosten" } += $form->{$item}{$key};
     }
     $form->{ "$key" . "rohertrag" } =
@@ -2552,12 +2557,12 @@ sub ustva {
 
   foreach $item (@categories_cent) {
     $form->{$item} =
-      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2));
+      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 2), 2, '0');
   }
 
   foreach $item (@categories_euro) {
     $form->{$item} =
-      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0));
+      $form->format_amount($myconfig, $form->round_amount($form->{$item}, 0), 0, '0');
   }
 
   $dbh->disconnect;