From: Sven Schöling Date: Tue, 7 Jan 2014 15:42:09 +0000 (+0100) Subject: Bei Belegdruck nicht unkonditional auf Projekte zugreifen X-Git-Tag: release-3.1.0beta1~22^2~25^2~6 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=896ef9aad9a10e738910bac80b71fde5d214bf99;p=kivitendo-erp.git Bei Belegdruck nicht unkonditional auf Projekte zugreifen behebt #2237 (wieder) --- 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; }