Revision 649529bf
Von Bernd Bleßmann vor fast 10 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
426 | 426 |
|
427 | 427 |
my $object = $entry->{object}; |
428 | 428 |
|
429 |
# Check wether or non part ID is valid.
|
|
429 |
# Check wether or not part ID is valid.
|
|
430 | 430 |
if ($object->parts_id && !$self->parts_by->{id}->{ $object->parts_id }) { |
431 | 431 |
push @{ $entry->{errors} }, $::locale->text('Error: Invalid part'); |
432 | 432 |
return 0; |
... | ... | |
624 | 624 |
my $order_entry; |
625 | 625 |
my @orderitems; |
626 | 626 |
foreach my $entry (@{ $self->controller->data }) { |
627 |
# search first order |
|
627 |
# search first/next order
|
|
628 | 628 |
if ($entry->{raw_data}->{datatype} eq $self->_order_column) { |
629 | 629 |
|
630 |
# new order entry: add collected orderitems to the previous one
|
|
630 |
# next order entry: add collected orderitems to the previous one
|
|
631 | 631 |
if (defined $order_entry) { |
632 | 632 |
$order_entry->{object}->orderitems(@orderitems); |
633 | 633 |
@orderitems = (); |
Auch abrufbar als: Unified diff
Kosmetik: Kommentare verbessert.