Revision 0c537bff
Von Sven Schöling vor mehr als 10 Jahren hinzugefügt
SL/Controller/CsvImport/Part.pm | ||
---|---|---|
436 | 436 |
if ($makemodel_orig) { |
437 | 437 |
$makemodel_orig->model($makemodel->model); |
438 | 438 |
$makemodel_orig->lastcost($makemodel->lastcost); |
439 |
$makemodel_orig->sortorder(undef); |
|
440 | 439 |
|
441 | 440 |
} else { |
442 | 441 |
$entry->{part}->add_makemodels($makemodel); |
443 | 442 |
} |
444 | 443 |
} |
445 | 444 |
|
445 |
# reindex makemodels |
|
446 |
my $i = 0; |
|
447 |
$_->sortorder(++$i) for @{ $entry->{part}->makemodels }; |
|
448 |
|
|
446 | 449 |
$entry->{part}->makemodel($object->makemodel); |
447 | 450 |
|
448 | 451 |
$self->save_with_cascade(1) if $found_any; |
Auch abrufbar als: Unified diff
CsvImport/Parts: makemodels fix inidzieren