]> wagnertech.de Git - kivitendo-erp.git/blobdiff - bin/mozilla/ir.pl
Merge von 639,640 aus unstable: Rundungsfehler nach erneuern
[kivitendo-erp.git] / bin / mozilla / ir.pl
index caa8a0e6d511c2dbd70931afccb2d7adbbb583b9..ee0e813a403a08624f937078a26721ea854e1d5a 100644 (file)
@@ -176,8 +176,12 @@ print STDERR "ir.pl-prepare_invoice\n";
       $form->{"sellprice_$i"} =
         $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
                              $decimalplaces);
+      
+      (my $dec_qty) = ($form->{"qty_$i"} =~ /\.(\d+)/);
+      $dec_qty      = length $dec_qty;
+      
       $form->{"qty_$i"} =
-        $form->format_amount(\%myconfig, ($form->{"qty_$i"} * -1));
+        $form->format_amount(\%myconfig, ($form->{"qty_$i"} * -1), $dec_qty);
 
       $form->{rowcount} = $i;
     }
@@ -823,7 +827,7 @@ sub update {
           $form->format_amount(\%myconfig, $form->{"sellprice_$i"},
                                $decimalplaces);
         $form->{"qty_$i"} =
-          $form->format_amount(\%myconfig, $form->{"qty_$i"});
+          $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
       }
 
       &display_form;