From: Bernd Bleßmann Date: Wed, 11 Nov 2015 12:10:59 +0000 (+0100) Subject: Auftrags-Controller: generate_attachment_filename beim Erzeugen des PDFs nehmen X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0ea99d65cafaa827d3bccbaf6e9ccb8f7458abfd;p=kivitendo-erp.git Auftrags-Controller: generate_attachment_filename beim Erzeugen des PDFs nehmen --- diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index aaa31cc19..6f422134a 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -125,9 +125,14 @@ sub action_create_pdf { my $key = join('_', Time::HiRes::gettimeofday(), int rand 1000000000000); $::auth->set_session_value("Order::create_pdf-${key}" => $sfile->file_name); - $::form->{formname} = $self->type; - $::form->{language} = 'de'; - my $pdf_filename = $::form->get_formname_translation . '_' . $self->order->ordnumber . '.pdf'; + my $form = Form->new; + $form->{ordnumber} = $self->order->ordnumber; + $form->{formname} = $self->type; + $form->{type} = $self->type; + $form->{language} = 'de'; + $form->{format} = 'pdf'; + + my $pdf_filename = $form->generate_attachment_filename(); $self->js ->run('download_pdf', $pdf_filename, $key)