X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FProject.pm;h=40d1a844bc55e9f4f37940af744105f5f01c0e8d;hb=2b01bfef4afb04fe2b2f0e7e1e79bffe5e38b281;hp=3f3e88ddbcb434c8328bd97cb4c0d87d71a95d87;hpb=766f5705ecb9cd56adfbffd94c871959bb64c6fd;p=kivitendo-erp.git diff --git a/SL/DB/Project.pm b/SL/DB/Project.pm index 3f3e88ddb..40d1a844b 100644 --- a/SL/DB/Project.pm +++ b/SL/DB/Project.pm @@ -60,6 +60,14 @@ sub full_description { } elsif ($params{style} =~ m/description/) { $description = $self->description; + } elsif (($params{style} =~ m/full/) && $self->customer) { + $description = $self->projectnumber; + if ($self->description && do { my $desc = quotemeta $self->description; $self->projectnumber !~ m/$desc/ }) { + $description .= ' ' . $self->description; + } + + $description = $self->customer->name . " (${description})"; + } else { $description = $self->projectnumber; if ($self->description && do { my $desc = quotemeta $self->description; $self->projectnumber !~ m/$desc/ }) { @@ -128,6 +136,16 @@ Returns only the project's number. Returns only the project's description. +=item C + +Returns the customer name followed by the project number and project +description in parenthesis (e.g. "Evil Corp (12345 World +domination)"). If the project's description is already part of the +project's number then it will not be appended. + +If this project isn't linked to a customer then the style C is +used instead. + =back =back