Revision c049c916
Von Bernd Bleßmann vor fast 11 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
762 | 762 |
# set order number and collect to save |
763 | 763 |
my $objects_to_save; |
764 | 764 |
foreach my $entry (@{ $self->controller->data }) { |
765 |
next if $entry->{raw_data}->{datatype} ne $self->_order_column; |
|
765 | 766 |
next if @{ $entry->{errors} }; |
766 | 767 |
|
767 |
if ($entry->{raw_data}->{datatype} eq $self->_order_column && !$entry->{object}->ordnumber) {
|
|
768 |
my $number = SL::TransNumber->new(type => 'sales_order',
|
|
769 |
save => 1);
|
|
768 |
if (!$entry->{object}->ordnumber) { |
|
769 |
my $number = SL::TransNumber->new(type => 'sales_order', |
|
770 |
save => 1); |
|
770 | 771 |
$entry->{object}->ordnumber($number->create_unique()); |
771 | 772 |
} |
772 | 773 |
|
Auch abrufbar als: Unified diff
Auftragsimport: nur Orders, nicht OrderItems explizit speichern.