From: Bernd Bleßmann Date: Wed, 24 Jan 2018 10:58:43 +0000 (+0100) Subject: Auftrags-Controller: Beim Drucken Sprache richtig berücksichtigen. X-Git-Tag: release-3.5.4~497 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9ec05722b441b2b9ba81ab74ca96286bec044fe1;p=kivitendo-erp.git Auftrags-Controller: Beim Drucken Sprache richtig berücksichtigen. --- diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index 0421e08f5..b58177463 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -152,6 +152,7 @@ sub action_print { my $language; $language = SL::DB::Language->new(id => $::form->{print_options}->{language_id})->load if $::form->{print_options}->{language_id}; + # create a form for generate_attachment_filename my $form = Form->new; $form->{ordnumber} = $self->order->ordnumber; $form->{type} = $self->type; @@ -1198,9 +1199,8 @@ sub _create_pdf { $print_form->{media} = $params->{media} || 'file'; $print_form->{groupitems} = $params->{groupitems}; $print_form->{media} = 'file' if $print_form->{media} eq 'screen'; - $print_form->{language} = $params->{language}->template_code if $print_form->{language}; - $print_form->{language_id} = $params->{language}->id if $print_form->{language}; + $order->language($params->{language}); $order->flatten_to_form($print_form, format_amounts => 1); # search for the template