projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Steuerzonen ungültig machen
[kivitendo-erp.git]
/
SL
/
Helper
/
CreatePDF.pm
diff --git
a/SL/Helper/CreatePDF.pm
b/SL/Helper/CreatePDF.pm
index
8d36eb7
..
1baeada
100644
(file)
--- 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 ($class, %params) = @_;
my $userspath = $::lx_office_conf{paths}->{userspath};
+ my $vars = $params{variables} || {};
my $form = Form->new('');
my $form = Form->new('');
+ $form->{$_} = $vars->{$_} for keys %{ $vars };
$form->{format} = 'pdf';
$form->{cwd} = getcwd();
$form->{templates} = $::instance_conf->get_templates;
$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{\.(.+)};
$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',
my $temp_fh;
($temp_fh, $form->{tmpfile}) = File::Temp::tempfile(
'kivitendo-printXXXXXX',
@@
-48,11
+47,12
@@
sub create_pdf {
UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1,
);
UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1,
);
- my $parser = SL::Template::LaTeX->new(
- $form->{IN},
- $form,
- \%::myconfig,
- $userspath,
+ my $parser = SL::Template::create(
+ type => 'LaTeX',
+ source => $form->{IN},
+ form => $form,
+ myconfig => \%::myconfig,
+ userspath => $userspath,
);
my $result = $parser->parse($temp_fh);
);
my $result = $parser->parse($temp_fh);