Revision 89b26688
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
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
PriceSource: Rabattbehandlung