From 9ec05722b441b2b9ba81ab74ca96286bec044fe1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 24 Jan 2018 11:58:43 +0100 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20Beim=20Drucken=20Sprache?= =?utf8?q?=20richtig=20ber=C3=BCcksichtigen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Order.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1