Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a26dbea9

Von Stephan Köhler vor mehr als 18 Jahren hinzugefügt

  • ID a26dbea9b796097fcb4d14b71a069d5a75eab4ca
  • Vorgänger 7ff673f9
  • Nachfolger f3edd66d

Merge von 772,773 aus unstable: Bugfix 220
-Fix zu Bug 220, Rabatt wurde nur fuer ein einzelnes Item berechnet.
Man sollte dazu noch erwaehnen, dass das anscheinend kein Bug,
sondern eine Designentscheidung im SQL-Ledger ist.
-Nachtrag zu Bug 220, Rabatt wurde nur fuer ein einzelnes Item berechnet.
Korrektur bei Angeboten

Unterschiede anzeigen:

SL/IS.pm
141 141
      $dec = length $dec;
142 142
      my $decimalplaces = ($dec > 2) ? $dec : 2;
143 143

  
144
      my $discount =
145
        $form->round_amount(
146
                            $sellprice * $form->parse_amount($myconfig,
147
                                                 $form->{"discount_$i"}) / 100,
148
                            $decimalplaces);
144
      my $i_discount = $form->round_amount($sellprice * 
145
                                           $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100, $decimalplaces);
146

  
147
      my $discount = $form->round_amount($form->{"qty_$i"} * $i_discount, $decimalplaces);
149 148

  
150 149
      # keep a netprice as well, (sellprice - discount)
151
      $form->{"netprice_$i"} = $sellprice - $discount;
150
      $form->{"netprice_$i"} = $sellprice - $i_discount;
151

  
152 152
      push(@{ $form->{netprice} },
153 153
           ($form->{"netprice_$i"} != 0)
154 154
           ? $form->format_amount(
SL/OE.pm
887 887
      $dec = length $dec;
888 888
      my $decimalplaces = ($dec > 2) ? $dec : 2;
889 889

  
890
      my $discount =
891
        $form->round_amount(
892
                            $sellprice * $form->parse_amount($myconfig,
893
                                                 $form->{"discount_$i"}) / 100,
894
                            $decimalplaces);
890
      my $i_discount = $form->round_amount($sellprice *
891
                                           $form->parse_amount($myconfig, $form->{"discount_$i"}) / 100, $decimalplaces);
892

  
893
      my $discount = $form->round_amount($form->{"qty_$i"} * $i_discount, $decimalplaces);
895 894

  
896 895
      # keep a netprice as well, (sellprice - discount)
897
      $form->{"netprice_$i"} = $sellprice - $discount;
896
      #$form->{"netprice_$i"} = $sellprice - $discount;
897
      $form->{"netprice_$i"} = $sellprice - $i_discount;
898 898

  
899 899
      my $linetotal =
900 900
        $form->round_amount($form->{"qty_$i"} * $form->{"netprice_$i"}, 2);

Auch abrufbar als: Unified diff