X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FPresenter%2FPart.pm;h=8f13aeeb9ed4b778c66761f85fbb787b09f60251;hb=d38565357c95d74fb29772d4f8a35d9727623a8b;hp=ac1bc8b7914f26da1b461d63cbb122d41176dba3;hpb=5eb166228b04d27236862de0bfc1d8df6080ba0b;p=kivitendo-erp.git diff --git a/SL/Presenter/Part.pm b/SL/Presenter/Part.pm index ac1bc8b79..8f13aeeb9 100644 --- a/SL/Presenter/Part.pm +++ b/SL/Presenter/Part.pm @@ -104,9 +104,13 @@ sub separate_abbreviation { # sub select_classification { my ($self, $name, %attributes) = @_; + $attributes{value_key} = 'id'; $attributes{title_key} = 'description'; - my $collection = SL::DB::Manager::PartClassification->get_all_sorted(); + + my $classification_type_filter = delete $attributes{type} // []; + + my $collection = SL::DB::Manager::PartClassification->get_all_sorted( where => $classification_type_filter ); $_->description($::locale->text($_->description)) for @{ $collection }; return $self->select_tag( $name, $collection, %attributes ); }