Merge branch 'master' of github.com:kivitendo/kivitendo-erp
authorJan Büren <jan@kivitendo-premium.de>
Thu, 4 Sep 2014 07:11:16 +0000 (09:11 +0200)
committerJan Büren <jan@kivitendo-premium.de>
Thu, 4 Sep 2014 07:11:16 +0000 (09:11 +0200)
SL/IS.pm
SL/OE.pm
doc/dokumentation.xml
templates/print/RB/invoice.html

index f429034..6c5aa9f 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -238,7 +238,7 @@ sub invoice_details {
 
       my $discount_round_error       = $discount + ($linetotal_exact - $nodiscount_exact_linetotal); # not used
 
-      $form->{"netprice_$i"}   = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2);
+      $form->{"netprice_$i"}   = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, $decimalplaces);
 
       push @{ $form->{TEMPLATE_ARRAYS}->{netprice} },       ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : '';
       push @{ $form->{TEMPLATE_ARRAYS}->{netprice_nofmt} }, ($form->{"netprice_$i"} != 0) ? $form->{"netprice_$i"} : '';
index 279b08c..52a5a61 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -1236,7 +1236,7 @@ sub order_details {
 
       my $discount_round_error       = $discount + ($linetotal_exact - $nodiscount_exact_linetotal); # not used
 
-      $form->{"netprice_$i"}   = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2);
+      $form->{"netprice_$i"}   = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, $decimalplaces);
 
       push @{ $form->{TEMPLATE_ARRAYS}->{netprice} },       ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : '';
       push @{ $form->{TEMPLATE_ARRAYS}->{netprice_nofmt} }, ($form->{"netprice_$i"} != 0) ? $form->{"netprice_$i"} : '';
index 5e86d1a..b7695c6 100644 (file)
@@ -3912,7 +3912,7 @@ ln -s $(pwd)/kivitendo-task-server.service /etc/systemd/system/</programlisting>
               <term><varname>netprice</varname></term>
 
               <listitem>
-                <para>Nettopreis</para>
+                <para>Alternative zu <varname>sellprice</varname>, aber <varname>netprice</varname> entspricht dem effektiven Einzelpreis und beinhaltet Zeilenrabatt und Preisfaktor. <varname>netprice</varname> wird rückgerechnet aus Zeilensumme / Menge. Diese Variable ist nützlich, wenn man den gewährten Rabatt in der Druckvorlage nicht anzeigen möchte, aber Menge * Einzelpreis trotzdem die angezeigte Zeilensumme ergeben soll. <varname>netprice</varname> hat nichts mit Netto/Brutto im Sinne von Steuern zu tun.</para>
               </listitem>
             </varlistentry>
 
index 2858f4f..b4a5ec9 100644 (file)
@@ -133,7 +133,7 @@ adjust the colspan if you include this to shift subtotal one to the right
 <!--
 you can also use netprice instead of sellprice if you
 don't want to show the discount
-netprice = sellprice - discount
+netprice = linetotal/qty
 -->
 
     <tr>