Revision 89b26688
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
587 | 587 |
if ($sellprice) { |
588 | 588 |
$form->{"sellprice_$i"} = $sellprice; |
589 | 589 |
} else { |
590 |
my $record = _make_record(); |
|
591 |
my $price_source = SL::PriceSource->new(record_item => $record->items->[$i-1], record => $record); |
|
592 |
my $best_price = $price_source->best_price; |
|
593 |
my $best_discount = $price_source->best_discount; |
|
594 |
|
|
595 |
if ($best_price) { |
|
596 |
$::form->{"sellprice_$i"} = $best_price->price; |
|
597 |
$::form->{"active_price_source_$i"} = $best_price->source; |
|
598 |
} |
|
599 |
if ($best_discount) { |
|
600 |
$::form->{"discount_$i"} = $best_discount->discount; |
|
601 |
$::form->{"active_discount_source_$i"} = $best_discount->source; |
|
602 |
} |
|
603 |
|
|
590 | 604 |
# if there is an exchange rate adjust sellprice |
591 |
$form->{"sellprice_$i"} *= (1 - $form->{tradediscount}); |
|
592 | 605 |
$form->{"sellprice_$i"} /= $exchangerate; |
593 | 606 |
} |
594 | 607 |
|
Auch abrufbar als: Unified diff
PriceSource: Rabattbehandlung