Revision cf6b6226
Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt
| SL/IR.pm | ||
|---|---|---|
|
|
||
|
next if $payments_only;
|
||
|
|
||
|
# after_save hook changes lastcost for all assemblies and assortments recursively
|
||
|
# change lastcost for part and all assemblies and assortments recursively
|
||
|
my $a = SL::DB::Part->load_cached(conv_i($form->{"id_$i"}));
|
||
|
$a->update_attributes(lastcost => abs($fxsellprice * $form->{exchangerate} / $basefactor));
|
||
|
my $part_price_factor = $a->price_factor_id ? $a->price_factor->factor : 1;
|
||
|
$a->update_attributes(lastcost => abs($fxsellprice * $form->{exchangerate} / $basefactor / $price_factor * $part_price_factor));
|
||
|
$a->set_lastcost_assemblies_and_assortiments;
|
||
|
|
||
|
# check if we sold the item already and
|
||
Auch abrufbar als: Unified diff
EK-Rechnung: Änderung EK-Preis berücksichtigt Preisfaktor