X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=6975fd9c194e25c8fdf0bf9e668346b5e1f57c70;hb=564d8509117493b1b4b28c08d95ba4d1df8d599b;hp=2afa3bb2717da10a2c96ed2d268b15c224765f53;hpb=6197875a089f314b2a5f22a5d0cf645cdcf7c46d;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 2afa3bb27..6975fd9c1 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1270,45 +1270,7 @@ sub edit_e_mail { $form->{oldmedia} = $form->{media}; $form->{media} = "email"; - my %formname_translations = ( - "bin_list" => $locale->text('Bin List'), - "credit_note" => $locale->text('Credit Note'), - "invoice" => $locale->text('Invoice'), - "packing_list" => $locale->text('Packing List'), - "pick_list" => $locale->text('Pick List'), - "proforma" => $locale->text('Proforma Invoice'), - "purchase_order" => $locale->text('Purchase Order'), - "request_quotation" => $locale->text('RFQ'), - "sales_order" => $locale->text('Confirmation'), - "sales_quotation" => $locale->text('Quotation'), - "storno_invoice" => $locale->text('Storno Invoice'), - "storno_packing_list" => $locale->text('Storno Packing List'), - ); - - my $attachment_filename = $formname_translations{$form->{"formname"}}; - my $prefix; - - if (grep({ $form->{"type"} eq $_ } qw(invoice credit_note))) { - $prefix = "inv"; - } elsif ($form->{"type"} =~ /_quotation$/) { - $prefix = "quo"; - } else { - $prefix = "ord"; - } - - if ($attachment_filename && $form->{"${prefix}number"}) { - $attachment_filename .= "_" . $form->{"${prefix}number"} . - ($form->{"format"} =~ /pdf/i ? ".pdf" : - $form->{"format"} =~ /postscript/i ? ".ps" : - $form->{"format"} =~ /opendocument/i ? ".odt" : - $form->{"format"} =~ /html/i ? ".html" : ""); - $attachment_filename =~ s/ /_/g; - my %umlaute = ( "ä" => "ae", "ö" => "oe", "ü" => "ue", - "Ä" => "Ae", "Ö" => "Oe", "Ü" => "Ue", "ß" => "ss"); - map { $attachment_filename =~ s/$_/$umlaute{$_}/g } keys %umlaute; - } else { - $attachment_filename = ""; - } + my $attachment_filename = $form->generate_attachment_filename(); $form->{"fokus"} = $form->{"email"} ? "Form.subject" : "Form.email"; $form->header;