Revision 78740728
Von Kivitendo Admin vor mehr als 8 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
|
||
|
||
# If order has errors set error for orderitems as well
|
||
# If one of the orderitems has an error, set an error for the order
|
||
# This algorithm only works for one order per csv file!
|
||
my $order_entry;
|
||
my $item_column_errors;
|
||
foreach my $entry (@{ $self->controller->data }) {
|
||
# Search first order
|
||
if ($entry->{raw_data}->{datatype} eq $self->_order_column) {
|
||
... | ... | |
&& $entry->{raw_data}->{datatype} eq $self->_item_column
|
||
&& scalar @{ $order_entry->{errors} } > 0 ) {
|
||
push @{ $entry->{errors} }, $::locale->text('Error: Invalid order for this order item');
|
||
}
|
||
$item_column_errors++;
|
||
} elsif ( defined $order_entry
|
||
&& $entry->{raw_data}->{datatype} eq $self->_item_column
|
||
&& scalar @{ $entry->{errors} } > 0 ) {
|
||
$item_column_errors++;
|
||
};
|
||
}
|
||
|
||
if ( $item_column_errors ) {
|
||
push @{ $order_entry->{errors} }, $::locale->text('Error: there are errors with #1 items', $item_column_errors);
|
||
};
|
||
}
|
||
|
||
sub handle_order {
|
locale/de/all | ||
---|---|---|
'Error: taxincluded has to be t or f' => 'Fehler: Steuer im Preis inbegriffen muß t oder f sein',
|
||
'Error: taxincluded wasn\'t set' => 'Fehler: Steuer im Preis inbegriffen nicht gesetzt (taxincluded)',
|
||
'Error: taxkey missing' => 'Fehler: Steuerschlüssel fehlt',
|
||
'Error: there are errors with #1 items' => 'Fehler: es gibt Fehler bei #1 Artikeln',
|
||
'Error: this feature requires that articles with a time-based unit (e.g. \'h\' or \'min\') exist.' => 'Fehler: dieses Feature setzt voraus, dass Artikel mit einer Zeit-basierenden Einheit (z.B. "Std") existieren.',
|
||
'Error: unknown local bank account' => 'Fehler: unbekannte Kontnummer',
|
||
'Error: unknown local bank account id' => 'Fehler: unbekannte Bankkonto-ID',
|
Auch abrufbar als: Unified diff
CSV Auftragsimport - Fehler bei Auftrag wenn Positionen falsch sind