From: Bernd Bleßmann Date: Mon, 12 Oct 2015 21:24:12 +0000 (+0200) Subject: Auftrags-Controller: Name der Druckvorlage und Download-Datei nicht fest verdrahten. X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=132a6f2c43d7e3a00e78dc5ea1d751dd249b46f3;p=kivitendo-erp.git Auftrags-Controller: Name der Druckvorlage und Download-Datei nicht fest verdrahten. --- diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index ee00b1546..25eae7a9b 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -124,7 +124,9 @@ sub action_create_pdf { my $key = join('_', Time::HiRes::gettimeofday(), int rand 1000000000000); $::auth->set_session_value("Order::create_pdf-${key}" => $sfile->file_name); - my $pdf_filename = t8('Sales Order') . '_' . $self->order->ordnumber . '.pdf'; + $::form->{formname} = $self->type; + $::form->{language} = 'de'; + my $pdf_filename = $::form->get_formname_translation . '_' . $self->order->ordnumber . '.pdf'; $self->js ->run('download_pdf', $pdf_filename, $key) @@ -560,8 +562,8 @@ sub _create_pdf { my ($order, $pdf_ref, $params) = @_; my $print_form = Form->new(''); - $print_form->{type} = 'sales_order'; - $print_form->{formname} = 'sales_order', + $print_form->{type} = $order->type; + $print_form->{formname} = $order->type; $print_form->{format} = $params->{format} || 'pdf', $print_form->{media} = $params->{media} || 'file';