From 896ef9aad9a10e738910bac80b71fde5d214bf99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 7 Jan 2014 16:42:09 +0100 Subject: [PATCH] Bei Belegdruck nicht unkonditional auf Projekte zugreifen behebt #2237 (wieder) --- SL/DO.pm | 6 +++--- SL/IS.pm | 6 +++--- SL/OE.pm | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SL/DO.pm b/SL/DO.pm index d0086fcd7..41903835a 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -749,10 +749,10 @@ sub order_details { %projects_by_id = map { $_->id => $_ } @$projects; } - $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber; - $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description; - if ($projects_by_id{$form->{"globalproject_id"}}) { + $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber; + $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description; + for (@{ $projects_by_id{$form->{"globalproject_id"}}->cvars_by_config }) { $form->{"project_cvar_" . $_->config->name} = $_->value_as_text; } diff --git a/SL/IS.pm b/SL/IS.pm index cd15325f1..b00e809b5 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -99,10 +99,10 @@ sub invoice_details { %projects_by_id = map { $_->id => $_ } @$projects; } - $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber; - $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description; - if ($projects_by_id{$form->{"globalproject_id"}}) { + $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber; + $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description; + for (@{ $projects_by_id{$form->{"globalproject_id"}}->cvars_by_config }) { $form->{"project_cvar_" . $_->config->name} = $_->value_as_text; } diff --git a/SL/OE.pm b/SL/OE.pm index ae3ff0807..797eb9717 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -1070,10 +1070,10 @@ sub order_details { %projects_by_id = map { $_->id => $_ } @$projects; } - $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber; - $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description; - if ($projects_by_id{$form->{"globalproject_id"}}) { + $form->{globalprojectnumber} = $projects_by_id{$form->{"globalproject_id"}}->projectnumber; + $form->{globalprojectdescription} = $projects_by_id{$form->{"globalproject_id"}}->description; + for (@{ $projects_by_id{$form->{"globalproject_id"}}->cvars_by_config }) { $form->{"project_cvar_" . $_->config->name} = $_->value_as_text; } -- 2.20.1