From 2651b9cb8cb0aaad5235c934bf56110d59196fef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Tue, 16 Mar 2021 16:29:11 +0100 Subject: [PATCH] =?utf8?q?Mahnung=20per=20Mail:=20auch=20Rechnung=20=C3=BC?= =?utf8?q?ber=20Mahngeb=C3=BChren=20anh=C3=A4ngen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Der Mailer erwartet den Pfad für das Attachment mit dem key "path", nicht "filename". Zudem übersetzten Anhang-Namen verwenden. --- SL/DN.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index 460d2311c..deeff6376 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -1102,7 +1102,8 @@ sub print_invoice_for_fees { map { delete $form->{$_} } grep /^[a-z_]+_\d+$/, keys %{ $form }; - $form->{attachment_filename} = $form->get_formname_translation('dunning_invoice') . "_${dunning_id}.pdf"; + my $attachment_filename = $form->get_formname_translation('dunning_invoice') . "_${dunning_id}.pdf"; + $form->{attachment_filename} = $attachment_filename; $form->{attachment_type} = "dunning"; $form->{attachment_id} = $form->{invoice_id}; $form->parse_template($myconfig); @@ -1110,8 +1111,8 @@ sub print_invoice_for_fees { restore_form($saved_form); push @{ $form->{DUNNING_PDFS} }, $filename; - push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${spool}/$filename", - 'name' => "dunning_invoice_${dunning_id}.pdf" }; + push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'path' => "${spool}/$filename", + 'name' => $attachment_filename }; $main::lxdebug->leave_sub(); } -- 2.20.1