X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FCsvImport%2FPart.pm;h=9ccaf83b534f70638241ea57d4db81ebd8b7b76d;hb=561d4521aa9148dc3523f297afdfea53b263b48d;hp=09430c6abcf40e2006eef0322c996ab02805974c;hpb=20599de536d3333628504f390310dbfbeb7fb5ad;p=kivitendo-erp.git diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index 09430c6ab..9ccaf83b5 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -118,7 +118,7 @@ sub init_parts_by { sub init_all_pricegroups { my ($self) = @_; - return SL::DB::Manager::Pricegroup->get_all(sort => 'id'); + return SL::DB::Manager::Pricegroup->get_all_sorted; } sub init_settings { @@ -223,7 +223,7 @@ sub check_buchungsgruppe { $object->buchungsgruppen_id(undef) if $object->buchungsgruppen_id && !$self->bg_by->{id}->{ $object->buchungsgruppen_id }; # 3. Look up name if supplied. - if (!$object->buchungsgruppen_id) { + if (!$object->buchungsgruppen_id && $entry->{raw_data}->{buchungsgruppe}) { my $bg = $self->bg_by->{description}->{ $entry->{raw_data}->{buchungsgruppe} }; $object->buchungsgruppen_id($bg->id) if $bg; }