From 4d050ca366a72bbdbcc3a0ef49b37867bee9eb59 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 9 Jan 2014 11:21:50 +0100 Subject: [PATCH] Pflichtenheft -> Angebot: Langtext per Default aus Abschnittsbeschreibung setzen --- SL/Controller/RequirementSpecOrder.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } } -- 2.20.1