From: Sven Schöling Date: Mon, 8 Sep 2014 14:10:28 +0000 (+0200) Subject: displayable_name für business, partsgroup, pricegroup X-Git-Tag: release-3.2.0beta~180 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=818a31fa04ad54812e9cb663108c89a72589b2f8;p=kivitendo-erp.git displayable_name für business, partsgroup, pricegroup --- diff --git a/SL/DB/Business.pm b/SL/DB/Business.pm index ada525da5..25a553656 100644 --- a/SL/DB/Business.pm +++ b/SL/DB/Business.pm @@ -18,4 +18,10 @@ sub validate { return @errors; } +sub displayable_name { + my $self = shift; + + return join ' ', grep $_, $self->id, $self->description; +} + 1; diff --git a/SL/DB/PartsGroup.pm b/SL/DB/PartsGroup.pm index cc4508bde..ed3c164fe 100644 --- a/SL/DB/PartsGroup.pm +++ b/SL/DB/PartsGroup.pm @@ -19,4 +19,10 @@ __PACKAGE__->meta->initialize; # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; +sub displayable_name { + my $self = shift; + + return join ' ', grep $_, $self->id, $self->partsgroup; +} + 1; diff --git a/SL/DB/Pricegroup.pm b/SL/DB/Pricegroup.pm index 1504448b0..b3183005f 100644 --- a/SL/DB/Pricegroup.pm +++ b/SL/DB/Pricegroup.pm @@ -7,4 +7,11 @@ use SL::DB::Manager::Pricegroup; __PACKAGE__->meta->initialize; +sub displayable_name { + my $self = shift; + + return join ' ', grep $_, $self->id, $self->pricegroup; +} + + 1;