Revision 69f73331
Von Bernd Bleßmann vor fast 11 Jahren hinzugefügt
SL/Controller/CsvImport/Order.pm | ||
---|---|---|
11 | 11 |
use SL::DB::Part; |
12 | 12 |
use SL::DB::PaymentTerm; |
13 | 13 |
use SL::DB::Contact; |
14 |
use SL::TransNumber; |
|
14 | 15 |
|
15 | 16 |
use parent qw(SL::Controller::CsvImport::BaseMulti); |
16 | 17 |
|
... | ... | |
403 | 404 |
next if @{ $entry->{errors} }; |
404 | 405 |
|
405 | 406 |
if ($entry->{raw_data}->{datatype} eq $self->settings->{'order_column'} && !$entry->{object}->ordnumber) { |
406 |
$entry->{object}->create_trans_number; |
|
407 |
my $number = SL::TransNumber->new(type => 'sales_order', |
|
408 |
save => 1); |
|
409 |
$entry->{object}->ordnumber($number->create_unique()); |
|
407 | 410 |
} |
408 | 411 |
|
409 | 412 |
push @{ $objects_to_save }, $entry; |
Auch abrufbar als: Unified diff
Transnumber zum Erzeugen der Auftragsnummer verwenden.