X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5eb166228b04d27236862de0bfc1d8df6080ba0b..a33ef0ec2f31a94dd1e87384eaf41a2f7b25385f:/SL/Presenter/Part.pm 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 ); }