From 818a31fa04ad54812e9cb663108c89a72589b2f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 8 Sep 2014 16:10:28 +0200 Subject: [PATCH] =?utf8?q?displayable=5Fname=20f=C3=BCr=20business,=20part?= =?utf8?q?sgroup,=20pricegroup?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Business.pm | 6 ++++++ SL/DB/PartsGroup.pm | 6 ++++++ SL/DB/Pricegroup.pm | 7 +++++++ 3 files changed, 19 insertions(+) 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; -- 2.20.1