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