- if ($type eq 'mixed' && $entry->{raw_data}->{type}) {
- $type = $entry->{raw_data}->{type} =~ m/^p/i ? 'part'
- : $entry->{raw_data}->{type} =~ m/^s/i ? 'service'
- : $entry->{raw_data}->{type} =~ m/^a/i ? 'assembly'
- : undef;
+ my $part_type = $self->settings->{part_type};
+ if ($part_type eq 'mixed' && $entry->{raw_data}->{part_type}) {
+ $part_type = $entry->{raw_data}->{part_type} =~ m/^p/i ? 'part'
+ : $entry->{raw_data}->{part_type} =~ m/^s/i ? 'service'
+ : $entry->{raw_data}->{part_type} =~ m/^assem/i ? 'assembly'
+ : $entry->{raw_data}->{part_type} =~ m/^assor/i ? 'assortment'
+ : $self->settings->{part_type};
+ }
+ my $classification_id = $self->settings->{classification_id};
+
+ if ( $entry->{raw_data}->{pclass} && length($entry->{raw_data}->{pclass}) >= 2 ) {
+ my $abbr1 = substr($entry->{raw_data}->{pclass},0,1);
+ my $abbr2 = substr($entry->{raw_data}->{pclass},1);
+
+ if ( $self->classification_by->{abbreviation}->{$abbr2} ) {
+ my $tmp_classification_id = $self->classification_by->{abbreviation}->{$abbr2}->id;
+ $classification_id = $tmp_classification_id if $tmp_classification_id;
+ }
+ if ($part_type eq 'mixed') {
+ $part_type = $abbr1 eq $::locale->text('Part (typeabbreviation)') ? 'part'
+ : $abbr1 eq $::locale->text('Service (typeabbreviation)') ? 'service'
+ : $abbr1 eq $::locale->text('Assembly (typeabbreviation)') ? 'assembly'
+ : $abbr1 eq $::locale->text('Assortment (typeabbreviation)') ? 'assortment'
+ : undef;
+ }