Revision d2e805ca
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/rp.pl | ||
---|---|---|
2003 | 2003 |
sub print_form { |
2004 | 2004 |
$lxdebug->enter_sub(); |
2005 | 2005 |
|
2006 |
my %replacements = |
|
2007 |
( |
|
2008 |
"?" => "ae", "?" => "oe", "?" => "ue", |
|
2009 |
"?" => "Ae", "?" => "Oe", "?" => "Ue", |
|
2010 |
"?" => "ss", |
|
2011 |
" " => "_" |
|
2012 |
); |
|
2013 |
|
|
2006 | 2014 |
$form->{statementdate} = $locale->date(\%myconfig, $form->{todate}, 1); |
2007 | 2015 |
|
2008 | 2016 |
$form->{templates} = "$myconfig{templates}"; |
2009 | 2017 |
|
2010 |
$form->{IN} = "$form->{type}.html";
|
|
2011 |
|
|
2018 |
my $suffix = "html";
|
|
2019 |
my $attachment_suffix = "html"; |
|
2012 | 2020 |
if ($form->{format} eq 'postscript') { |
2013 | 2021 |
$form->{postscript} = 1; |
2014 |
$form->{IN} =~ s/html$/tex/;
|
|
2015 |
}
|
|
2016 |
if ($form->{format} eq 'pdf') { |
|
2022 |
$suffix = "tex";
|
|
2023 |
$attachment_suffix = "ps";
|
|
2024 |
} elsif ($form->{format} eq 'pdf') {
|
|
2017 | 2025 |
$form->{pdf} = 1; |
2018 |
$form->{IN} =~ s/html$/tex/; |
|
2026 |
$suffix = "tex"; |
|
2027 |
$attachment_suffix = "pdf"; |
|
2019 | 2028 |
} |
2020 | 2029 |
|
2030 |
$form->{IN} = "$form->{type}.$suffix"; |
|
2031 |
|
|
2032 |
|
|
2021 | 2033 |
# Save $form->{email} because it will be overwritten. |
2022 | 2034 |
$form->{EMAIL_RECIPIENT} = $form->{email}; |
2023 | 2035 |
|
... | ... | |
2077 | 2089 |
$form->format_amount(\%myconfig, $form->{"${_}total"}, 2) |
2078 | 2090 |
} (c0, c30, c60, c90, ""); |
2079 | 2091 |
|
2092 |
$form->{attachment_filename} = $locale->text("Statement") . "_$form->{todate}.$attachment_suffix"; |
|
2093 |
map({ $form->{attachment_filename} =~ s/$_/$replacements{$_}/g; } keys(%replacements)); |
|
2094 |
|
|
2080 | 2095 |
$form->parse_template(\%myconfig, $userspath); |
2081 | 2096 |
|
2082 | 2097 |
} |
Auch abrufbar als: Unified diff
Beim Verschicken von Sammelrechnungen per Email einen besseren Namen für den Dateianhang wählen.