Revision 59e3b9a9
Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
656 | 656 |
sub save_objects { |
657 | 657 |
my ($self, %params) = @_; |
658 | 658 |
|
659 |
# set order number and collect to save
|
|
660 |
my $objects_to_save = [];
|
|
659 |
# Collect orders without errors to save.
|
|
660 |
my $entries_to_save = [];
|
|
661 | 661 |
foreach my $entry (@{ $self->controller->data }) { |
662 | 662 |
next if $entry->{raw_data}->{datatype} ne $self->_order_column; |
663 | 663 |
next if @{ $entry->{errors} }; |
664 | 664 |
|
665 |
push @{ $objects_to_save }, $entry;
|
|
665 |
push @{ $entries_to_save }, $entry;
|
|
666 | 666 |
} |
667 | 667 |
|
668 |
$self->SUPER::save_objects(data => $objects_to_save);
|
|
668 |
$self->SUPER::save_objects(data => $entries_to_save);
|
|
669 | 669 |
} |
670 | 670 |
|
671 | 671 |
sub _order_column { |
Auch abrufbar als: Unified diff
CsvImport Aufträge: Variable besser benannt und Kommentar berichtigt.