From 0ca195cd0ce041bbabc562e0cc7ad6590a7eebe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 9 Nov 2018 15:20:08 +0100 Subject: [PATCH] =?utf8?q?Part-Presenter:=20Typ=20u.=20Klassifizierung:=20?= =?utf8?q?Abfangen,=20wenn=20kein=20Argument=20=C3=BCbergeben?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit behebt #332 "Bug: Bericht Lagerbestand gibt Fehler beim einschliessen leerer Lagerplätze" --- SL/Presenter/Part.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SL/Presenter/Part.pm b/SL/Presenter/Part.pm index 8131eff14..4f2105caa 100644 --- a/SL/Presenter/Part.pm +++ b/SL/Presenter/Part.pm @@ -61,6 +61,8 @@ sub picker { goto &part_picker } # 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'; @@ -87,6 +89,9 @@ sub type_abbreviation { # 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) : ''; @@ -103,6 +108,9 @@ sub typeclass_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) : ''; -- 2.20.1