From: Moritz Bunkus Date: Thu, 9 Jan 2014 10:21:50 +0000 (+0100) Subject: Pflichtenheft -> Angebot: Langtext per Default aus Abschnittsbeschreibung setzen X-Git-Tag: release-3.2.0beta~467^2~60 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4d050ca366a72bbdbcc3a0ef49b37867bee9eb59;p=kivitendo-erp.git Pflichtenheft -> Angebot: Langtext per Default aus Abschnittsbeschreibung setzen --- diff --git a/SL/Controller/RequirementSpecOrder.pm b/SL/Controller/RequirementSpecOrder.pm index f0f20d496..0e9785272 100644 --- a/SL/Controller/RequirementSpecOrder.pm +++ b/SL/Controller/RequirementSpecOrder.pm @@ -242,8 +242,10 @@ sub create_order_item { my $longdescription = $translation->{longdescription} || $part->notes; if (!$section->{keep_description}) { + $description = '<%fb_number%> <%title%>' unless $description =~ m{<%}; + $longdescription = '<%description%>' unless $longdescription =~ m{<%}; + foreach my $field (\$description, \$longdescription) { - $$field = '<%fb_number%> <%title%>' unless $$field =~ m{<%}; $$field =~ s{<% (.+?) %>}{ $section->can($1) ? $section->$1 : '<' . t8('Invalid variable #1', $1) . '>' }egx; } }