Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 89b26688

Von Sven Schöling vor mehr als 9 Jahren hinzugefügt

  • ID 89b2668811eac6023ad58322e2f9970ddb6a27c9
  • Vorgänger c653b98f
  • Nachfolger 766ed2a6

PriceSource: Rabattbehandlung

Unterschiede anzeigen:

bin/mozilla/oe.pl
678 678
        if ($sellprice) {
679 679
          $form->{"sellprice_$i"} = $sellprice;
680 680
        } else {
681
          my $record       = _make_record();
682
          my $price_source = SL::PriceSource->new(record_item => $record->items->[$i-1], record => $record);
683
          my $best_price   = $price_source->best_price;
681
          my $record        = _make_record();
682
          my $price_source  = SL::PriceSource->new(record_item => $record->items->[$i-1], record => $record);
683
          my $best_price    = $price_source->best_price;
684
          my $best_discount = $price_source->best_discount;
684 685

  
685 686
          if ($best_price) {
686 687
            $::form->{"sellprice_$i"}           = $best_price->price;
687 688
            $::form->{"active_price_source_$i"} = $best_price->source;
688 689
          }
690
          if ($best_discount) {
691
            $::form->{"discount_$i"}               = $best_discount->discount;
692
            $::form->{"active_discount_source_$i"} = $best_discount->source;
693
          }
689 694

  
690
          $form->{"sellprice_$i"} *= (1 - $form->{tradediscount});
691 695
          $form->{"sellprice_$i"} /= $exchangerate;   # if there is an exchange rate adjust sellprice
692 696
        }
693 697

  

Auch abrufbar als: Unified diff