Revision f87214b2
Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
162 | 162 |
{ name => 'cusordnumber', description => $::locale->text('Customer Order Number') }, |
163 | 163 |
{ name => 'description', description => $::locale->text('Description') }, |
164 | 164 |
{ name => 'discount', description => $::locale->text('Discount') }, |
165 |
{ name => 'ean', description => $::locale->text('EAN') }, |
|
165 | 166 |
{ name => 'lastcost', description => $::locale->text('Lastcost') }, |
166 | 167 |
{ name => 'longdescription', description => $::locale->text('Long Description') }, |
167 | 168 |
{ name => 'marge_percent', description => $::locale->text('Margepercent') }, |
... | ... | |
464 | 465 |
$object->parts_id($part->id); |
465 | 466 |
} |
466 | 467 |
|
468 |
# Map ean to ID if given. |
|
469 |
if (!$object->parts_id && $entry->{raw_data}->{ean}) { |
|
470 |
my $part = $self->parts_by->{ean}->{ $entry->{raw_data}->{ean} }; |
|
471 |
if (!$part) { |
|
472 |
push @{ $entry->{errors} }, $::locale->text('Error: Invalid part'); |
|
473 |
return 0; |
|
474 |
} |
|
475 |
|
|
476 |
$object->parts_id($part->id); |
|
477 |
} |
|
478 |
|
|
467 | 479 |
if ($object->parts_id) { |
468 | 480 |
$entry->{info_data}->{partnumber} = $self->parts_by->{id}->{ $object->parts_id }->partnumber; |
469 | 481 |
} else { |
Auch abrufbar als: Unified diff
CsvImport Aufträge: Artikel auch nach EAN suchen