From: Moritz Bunkus Date: Thu, 12 Jun 2014 13:21:34 +0000 (+0200) Subject: SL::Helper::CreatePDF: gewisse Variablen nicht mit Variablen überschreiben lassen X-Git-Tag: release-3.2.0beta~411^2~62 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=040c460bc23544a1777785b238a9e44e3d38830b;p=kivitendo-erp.git SL::Helper::CreatePDF: gewisse Variablen nicht mit Variablen überschreiben lassen --- diff --git a/SL/Helper/CreatePDF.pm b/SL/Helper/CreatePDF.pm index 8d36eb749..555e75d73 100644 --- a/SL/Helper/CreatePDF.pm +++ b/SL/Helper/CreatePDF.pm @@ -29,7 +29,9 @@ sub create_pdf { my ($class, %params) = @_; my $userspath = $::lx_office_conf{paths}->{userspath}; + my $vars = $params{variables} || {}; my $form = Form->new(''); + $form->{$_} = $vars->{$_} for keys %{ $vars }; $form->{format} = 'pdf'; $form->{cwd} = getcwd(); $form->{templates} = $::instance_conf->get_templates; @@ -37,9 +39,6 @@ sub create_pdf { $form->{tmpdir} = $form->{cwd} . '/' . $userspath; my ($suffix) = $params{template} =~ m{\.(.+)}; - my $vars = $params{variables} || {}; - $form->{$_} = $vars->{$_} for keys %{ $vars }; - my $temp_fh; ($temp_fh, $form->{tmpfile}) = File::Temp::tempfile( 'kivitendo-printXXXXXX',