return 0;
}
+ if ($self->parts_by->{id}->{ $object->parts_id }->obsolete) {
+ push @{ $entry->{errors} }, $::locale->text('Error: Part is obsolete');
+ return 0;
+ }
+
return 1;
}
next if $entry->{raw_data}->{datatype} ne $self->_order_column;
next if @{ $entry->{errors} };
- if (!$entry->{object}->ordnumber) {
- my $number = SL::TransNumber->new(type => 'sales_order',
- save => 1);
- $entry->{object}->ordnumber($number->create_unique());
- }
-
push @{ $objects_to_save }, $entry;
}