From 40b16805562b0bf57d5a5c66c194a9d6cfc855ef Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 6 Aug 2013 11:57:45 +0200 Subject: [PATCH] =?utf8?q?Wiederkehrende=20Rechnungen:=20nicht=20'=5Femail?= =?utf8?q?'=20in=20Vorlagendateinamen=20hinzuf=C3=BCgenn?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In Form::prepare_for_printing wurde '_email' immer an den Dateinamen angehängt, sofern es ein solches Template gibt (also z.B. 'invoice_email.tex') -- egal, wohin letztlich ausgegeben werden soll (via 'media'). Nun wird das nur noch gemacht, wenn 'media' == 'email' ist. --- SL/Form.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/Form.pm b/SL/Form.pm index dbb9337b3..8ae6ed41f 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -3415,7 +3415,7 @@ sub prepare_for_printing { } my $printer_code = $self->{printer_code} ? '_' . $self->{printer_code} : ''; - my $email_extension = -f ($defaults->templates . "/$self->{formname}_email${language}.${extension}") ? '_email' : ''; + my $email_extension = $self->{media} eq 'email' && -f ($defaults->templates . "/$self->{formname}_email${language}.${extension}") ? '_email' : ''; $self->{IN} = "$self->{formname}${email_extension}${language}${printer_code}.${extension}"; # Format dates. -- 2.20.1