From: Moritz Bunkus Date: Wed, 8 Jan 2014 09:05:42 +0000 (+0100) Subject: Form->prepare_for_printing: template_meta zur Verfügung stellen X-Git-Tag: release-3.1.0beta1~22^2~22^2~19^2~5^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=142628e0282159c5c7f06b8cd6ec1c7707a69e55;p=kivitendo-erp.git Form->prepare_for_printing: template_meta zur Verfügung stellen Behebt #2247. --- diff --git a/SL/Form.pm b/SL/Form.pm index e115f9706..2e4f5a9be 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -3465,6 +3465,16 @@ sub prepare_for_printing { $self->reformat_numbers($output_numberformat, $precision, @{ $field_list }); } + $self->{template_meta} = { + formname => $self->{formname}, + language => SL::DB::Manager::Language->find_by_or_create(id => $self->{language_id} || undef), + format => $self->{format}, + media => $self->{media}, + extension => $extension, + printer => SL::DB::Manager::Printer->find_by_or_create(id => $self->{printer_id} || undef), + today => DateTime->today, + }; + return $self; }