From f9b53d4af20d99001897df018b22f30bf7c9186d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 2 Feb 2016 11:15:27 +0100 Subject: [PATCH] Letter: Fehler beim Druck --- SL/Controller/Letter.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Letter.pm b/SL/Controller/Letter.pm index 0f1a40f5f..6509742d7 100644 --- a/SL/Controller/Letter.pm +++ b/SL/Controller/Letter.pm @@ -174,12 +174,14 @@ sub action_print_letter { $self->export_letter_to_form($letter); $::form->{formname} = "letter"; - $::form->{format} = "pdf"; + $::form->{type} = "letter"; + $::form->{format} = "pdf"; my $language_saved = $::form->{language_id}; my $greeting_saved = $::form->{greeting}; my $cp_id_saved = $::form->{cp_id}; + $::form->{customer_id} = $self->letter->vc_id; IS->customer_details(\%::myconfig, $::form); if (!$cp_id_saved) { @@ -245,6 +247,7 @@ sub action_print_letter { my $file = IO::File->new($pdf_file_name, 'r') || croak("Cannot open file '$pdf_file_name'"); my $size = -s $pdf_file_name; my $content_type = 'application/pdf'; + $::form->{letternumber} = $self->letter->letternumber; my $attachment_name = $::form->generate_attachment_filename; $attachment_name =~ s:.*//::g; -- 2.20.1