Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 21717dcd

Von Moritz Bunkus vor etwa 16 Jahren hinzugefügt

  • ID 21717dcdc5c4da65aee616af66271b9f6fc164eb
  • Vorgänger 5ad3a4a5
  • Nachfolger ea38a4b3

Bei Berechnung des absoluten Rabattes den Rundungsfehler mit einbeziehen.

Unterschiede anzeigen:

SL/IS.pm
213 213
      my $decimalplaces = max 2, length($dec);
214 214

  
215 215
      my $parsed_discount      = $form->parse_amount($myconfig, $form->{"discount_$i"});
216
      my $discount             = $form->round_amount($form->{"qty_$i"} * $sellprice * $parsed_discount / 100 / $price_factor->{factor}, $decimalplaces);
217
      my $linetotal            = $form->round_amount($form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor}, 2);
216
      my $linetotal_exact      =                     $form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor};
217
      my $linetotal            = $form->round_amount($linetotal_exact, 2);
218
      my $discount             = $form->round_amount($form->{"qty_$i"} * $sellprice * $parsed_discount / 100 / $price_factor->{factor} - ($linetotal - $linetotal_exact),
219
                                                     $decimalplaces);
218 220
      my $nodiscount_linetotal = $form->round_amount($form->{"qty_$i"} * $sellprice / $price_factor->{factor}, 2);
219 221
      $form->{"netprice_$i"}   = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2);
220 222

  
SL/OE.pm
1011 1011
      my $decimalplaces = max 2, length($dec);
1012 1012

  
1013 1013
      my $parsed_discount      = $form->parse_amount($myconfig, $form->{"discount_$i"});
1014
      my $discount             = $form->round_amount($form->{"qty_$i"} * $sellprice * $parsed_discount / 100 / $price_factor->{factor}, $decimalplaces);
1015
      my $linetotal            = $form->round_amount($form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor}, 2);
1014
      my $linetotal_exact      =                     $form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor};
1015
      my $linetotal            = $form->round_amount($linetotal_exact, 2);
1016
      my $discount             = $form->round_amount($form->{"qty_$i"} * $sellprice * $parsed_discount / 100 / $price_factor->{factor} - ($linetotal - $linetotal_exact),
1017
                                                     $decimalplaces);
1016 1018
      my $nodiscount_linetotal = $form->round_amount($form->{"qty_$i"} * $sellprice / $price_factor->{factor}, 2);
1017 1019
      $form->{"netprice_$i"}   = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2);
1018 1020

  

Auch abrufbar als: Unified diff