Revision c14eb2d1
Von Sven Schöling vor etwa 9 Jahren hinzugefügt
bin/mozilla/io.pl | ||
---|---|---|
556 | 556 |
|
557 | 557 |
map { $form->{"${_}_$i"} = $new_item->{$_} } @new_fields; |
558 | 558 |
|
559 |
my $record = _make_record();
|
|
560 |
my $price_source = SL::PriceSource->new(record_item => $record->items->[$i-1], record => $record); |
|
561 |
my $best_price = $price_source->best_price; |
|
559 |
if (my $record = _make_record()) {
|
|
560 |
my $price_source = SL::PriceSource->new(record_item => $record->items->[$i-1], record => $record);
|
|
561 |
my $best_price = $price_source->best_price;
|
|
562 | 562 |
|
563 |
if ($best_price) { |
|
564 |
$::form->{"sellprice_$i"} = $best_price->price; |
|
565 |
$::form->{"active_price_source_$i"} = $best_price->source; |
|
566 |
} |
|
563 |
if ($best_price) {
|
|
564 |
$::form->{"sellprice_$i"} = $best_price->price;
|
|
565 |
$::form->{"active_price_source_$i"} = $best_price->source;
|
|
566 |
}
|
|
567 | 567 |
|
568 |
my $best_discount = $price_source->best_discount; |
|
568 |
my $best_discount = $price_source->best_discount;
|
|
569 | 569 |
|
570 |
if ($best_discount) { |
|
571 |
$::form->{"discount_$i"} = $best_discount->discount; |
|
572 |
$::form->{"active_discount_source_$i"} = $best_discount->source; |
|
570 |
if ($best_discount) { |
|
571 |
$::form->{"discount_$i"} = $best_discount->discount; |
|
572 |
$::form->{"active_discount_source_$i"} = $best_discount->source; |
|
573 |
} |
|
573 | 574 |
} |
574 | 575 |
|
575 |
|
|
576 | 576 |
$form->{"marge_price_factor_$i"} = $new_item->{price_factor}; |
577 | 577 |
|
578 | 578 |
if ($form->{"part_payment_id_$i"} ne "") { |
Auch abrufbar als: Unified diff
PriceSource: Bei item_selected Preisequellen nur in Belegen pollen.