]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Manager/PartClassification.pm
Entwürfe: beim Buchen dazugehörigen Entwurf löschen
[mfinanz.git] / SL / DB / Manager / PartClassification.pm
index 0924011e75410e4e9418f0109803ce494057d4a9..9730f44828649f6e64393f7f2d55f43eb9aeb3da 100644 (file)
@@ -9,14 +9,15 @@ sub object_class { 'SL::DB::PartClassification' }
 
 __PACKAGE__->make_manager_methods;
 
-#
-# get the one/two character shortcut of the parts classification
-#
-sub get_abbreviation {
-  my ($class,$id) = @_;
-  my $obj = $class->get_first(query => [ id => $id ]);
-  return '' unless $obj;
-  return $obj->abbreviation?$obj->abbreviation:'';
+sub classification_filter {
+  my ($class, $classification, $prefix) = @_;
+
+  return () unless $classification;
+
+  $prefix //= '';
+
+  my @classifications = grep { $_ } listify($classification);
+  return ( $prefix . 'classification_id' => \@classifications );
 }
 
 1;
@@ -30,27 +31,4 @@ __END__
 
 SL::DB::Manager::PartClassification
 
-
-=head1 SYNOPSIS
-
-This class has wrapper methodes to get the shortcuts
-
-=head1 METHODS
-
-=head2 get_abbreviation
-
- $class->get_abbreviation($classification_id);
-
-get the one/two character shortcut of the parts classification
-
-=head2 get_separate_abbreviation
-
- $class->get_separate_abbreviation($classification_id);
-
-get the one/two character shortcut of the parts classification if it is a separate article
-
-=head1 AUTHOR
-
-Martin Helmling E<lt>martin.helmling@opendynamic.deE<gt>
-
 =cut