#
sub type_abbreviation {
my ($part_type) = @_;
+
+ return '' if !$part_type;
return $::locale->text('Assembly (typeabbreviation)') if $part_type eq 'assembly';
return $::locale->text('Part (typeabbreviation)') if $part_type eq 'part';
return $::locale->text('Assortment (typeabbreviation)') if $part_type eq 'assortment';
#
sub classification_abbreviation {
my ($id) = @_;
+
+ return '' if !$id;
+
SL::DB::Manager::PartClassification->cache_all();
my $obj = SL::DB::PartClassification->load_cached($id);
$obj && $obj->abbreviation ? t8($obj->abbreviation) : '';
#
sub separate_abbreviation {
my ($id) = @_;
+
+ return '' if !$id;
+
SL::DB::Manager::PartClassification->cache_all();
my $obj = SL::DB::PartClassification->load_cached($id);
$obj && $obj->abbreviation && $obj->report_separate ? t8($obj->abbreviation) : '';