X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f9676efea9ccfa01df2a57dca9c45cc8fde0d09e..2d75060f8f44f7be4e65a07cd04b3f1735d9fed7:/SL/DB/Contact.pm diff --git a/SL/DB/Contact.pm b/SL/DB/Contact.pm index 69d666fec..aa74bea3d 100644 --- a/SL/DB/Contact.pm +++ b/SL/DB/Contact.pm @@ -6,8 +6,25 @@ package SL::DB::Contact; use strict; use SL::DB::MetaSetup::Contact; +use SL::DB::Helper::CustomVariables ( + module => 'Contacts', + cvars_alias => 1, +); # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; +sub full_name { + my ($self) = @_; + die 'not an accessor' if @_ > 1; + join ', ', grep $_, $self->cp_name, $self->cp_givenname; +} + +sub full_name_dep { + my ($self) = @_; + die 'not an accessor' if @_ > 1; + $self->full_name + . join '', map { " ($_)" } grep $_, $self->cp_abteilung; +} + 1;