Revision 6826e7ed
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1316 | 1316 |
my $attachment_filename = $main::locale->unquote_special_chars('HTML', $self->get_formname_translation()); |
1317 | 1317 |
my $prefix = $self->get_number_prefix_for_type(); |
1318 | 1318 |
|
1319 |
if ($attachment_filename && $self->{"${prefix}number"}) { |
|
1319 |
if ($self->{preview} && (first { $self->{type} eq $_ } qw(invoice credit_note))) { |
|
1320 |
$attachment_filename .= ' (' . $main::locale->text('Preview') . ')' . $self->get_extension_for_format(); |
|
1321 |
|
|
1322 |
} elsif ($attachment_filename && $self->{"${prefix}number"}) { |
|
1320 | 1323 |
$attachment_filename .= "_" . $self->{"${prefix}number"} . $self->get_extension_for_format(); |
1321 |
$attachment_filename = $main::locale->quote_special_chars('filenames', $attachment_filename); |
|
1322 |
$attachment_filename =~ s|[\s/\\]+|_|g; |
|
1324 |
|
|
1323 | 1325 |
} else { |
1324 | 1326 |
$attachment_filename = ""; |
1325 | 1327 |
} |
1326 | 1328 |
|
1329 |
$attachment_filename = $main::locale->quote_special_chars('filenames', $attachment_filename); |
|
1330 |
$attachment_filename =~ s|[\s/\\]+|_|g; |
|
1331 |
|
|
1327 | 1332 |
return $attachment_filename; |
1328 | 1333 |
} |
1329 | 1334 |
|
Auch abrufbar als: Unified diff
Bei Druckvorschau einer Rechnung den Namen der herunterladbaren Datei nicht auf "is.pdf" belassen, sondern auf "Rechnung_(Druckvorschau).pdf" setzen.