projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0f652b
)
full_name und full_name_dep methoden für Contact
author
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 29 Nov 2011 15:44:30 +0000
(16:44 +0100)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 29 Nov 2011 15:47:47 +0000
(16:47 +0100)
SL/DB/Contact.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Contact.pm
b/SL/DB/Contact.pm
index
d9ebf93
..
aa74bea
100644
(file)
--- a/
SL/DB/Contact.pm
+++ b/
SL/DB/Contact.pm
@@
-14,4
+14,17
@@
use SL::DB::Helper::CustomVariables (
# 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;