Merge von 697,698 aus unstable: BWA-Darstellung
authorStephan Köhler <s.koehler@linet-services.de>
Fri, 23 Dec 2005 11:10:57 +0000 (11:10 +0000)
committerStephan Köhler <s.koehler@linet-services.de>
Fri, 23 Dec 2005 11:10:57 +0000 (11:10 +0000)
r697: BWA Darstellung korrigiert: Dezimalstellenangabe, Rundung, Formatierung mit Nachkommastellen
r698: BWA Darstellung korrigiert: Dezimalstellenangabe

SL/RP.pm
bin/mozilla/rp.pl

index 5bc2b4e..f7afbb0 100644 (file)
--- a/SL/RP.pm
+++ b/SL/RP.pm
@@ -2346,6 +2346,7 @@ sub bwa {
     foreach $kosten (@gesamtkosten) {
       $form->{$kosten}{$key} *= -1;
     }
+    
     $form->{4}{$key} *= -1;
 
     foreach $category (@categories) {
@@ -2354,7 +2355,7 @@ sub bwa {
         $form->{"$key$category"} =
           $form->format_amount($myconfig,
                                $form->round_amount($form->{$category}{$key}, 2
-                               ));
+                               ), $form->{decimalplaces}, '0');
       }
     }
     foreach $item (@gesamtleistung) {
@@ -2392,8 +2393,8 @@ sub bwa {
                                  ($form->{$category}{$key} /
                                     $form->{ "$key" . "gesamtleistung" } * 100
                                  ),
-                                 2
-                               ));
+                                 $form->{decimalplaces}
+                               ), $form->{decimalplaces}, '0');
         }
       }
       foreach $item (@ergebnisse) {
@@ -2403,8 +2404,8 @@ sub bwa {
                                  ( $form->{ "$key" . "$item" } /
                                      $form->{ "$key" . "gesamtleistung" } * 100
                                  ),
-                                 2
-                               ));
+                                 $form->{decimalplaces}
+                               ), $form->{decimalplaces}, '0');
       }
     }
 
@@ -2417,8 +2418,8 @@ sub bwa {
                                    ($form->{$category}{$key} /
                                       $form->{ "$key" . "gesamtkosten" } * 100
                                    ),
-                                   2
-                                 ));
+                                   $form->{decimalplaces}
+                                 ), $form->{decimalplaces}, '0');
         }
       }
       foreach $item (@ergebnisse) {
@@ -2428,8 +2429,8 @@ sub bwa {
                                    ($form->{ "$key" . "$item" } /
                                       $form->{ "$key" . "gesamtkosten" } * 100
                                    ),
-                                   2
-                               ));
+                                   $form->{decimalplaces}
+                               ), $form->{decimalplaces}, '0');
       }
     }
 
@@ -2440,8 +2441,9 @@ sub bwa {
             $form->format_amount(
                       $myconfig,
                       $form->round_amount(
-                        ($form->{$category}{$key} / $form->{10}{$key} * 100), 2
-                      ));
+                        ($form->{$category}{$key} / $form->{10}{$key} * 100), 
+                        $form->{decimalplaces}
+                      ), $form->{decimalplaces}, '0');
         }
       }
       foreach $item (@ergebnisse) {
@@ -2451,8 +2453,8 @@ sub bwa {
                                                 ($form->{ "$key" . "$item" } /
                                                    $form->{10}{$key} * 100
                                                 ),
-                                                2
-                               ));
+                                                $form->{decimalplaces}
+                               ), $form->{decimalplaces}, '0');
       }
     }
 
@@ -2463,8 +2465,9 @@ sub bwa {
             $form->format_amount(
                        $myconfig,
                        $form->round_amount(
-                         ($form->{$category}{$key} / $form->{4}{$key} * 100), 2
-                       ));
+                         ($form->{$category}{$key} / $form->{4}{$key} * 100), 
+                         $form->{decimalplaces}
+                       ), $form->{decimalplaces}, '0');
         }
       }
       foreach $item (@ergebnisse) {
@@ -2474,16 +2477,17 @@ sub bwa {
                                                 ($form->{ "$key" . "$item" } /
                                                    $form->{4}{$key} * 100
                                                 ),
-                                                2
-                               ));
+                                                $form->{decimalplaces}
+                               ), $form->{decimalplaces}, '0');
       }
     }
 
     foreach $item (@ergebnisse) {
       $form->{ "$key" . "$item" } =
         $form->format_amount($myconfig,
-                             $form->round_amount($form->{ "$key" . "$item" }, 2
-                             ));
+                             $form->round_amount($form->{ "$key" . "$item" }, 
+                             $form->{decimalplaces}
+                             ), $form->{decimalplaces}, '0');
     }
 
   }
index 7989d86..a66a629 100644 (file)
@@ -533,7 +533,11 @@ $checked></td>
       . $locale->text('EUR')
       . qq|</td>
        </tr>
-
+        <tr>
+         <th align=right colspan=4>| . $locale->text('Decimalplaces') . qq|</th>
+             <td><input name=decimalplaces size=3></td>
+         </tr>
+                                    
 $jsscript
 |;
   }