projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In Form.pm gibt es kein $form, nur $self.
[kivitendo-erp.git]
/
bin
/
mozilla
/
rp.pl
diff --git
a/bin/mozilla/rp.pl
b/bin/mozilla/rp.pl
index
a496faa
..
152db95
100644
(file)
--- a/
bin/mozilla/rp.pl
+++ b/
bin/mozilla/rp.pl
@@
-40,6
+40,7
@@
require "bin/mozilla/common.pl";
use SL::PE;
use SL::RP;
use SL::PE;
use SL::RP;
+use SL::USTVA;
1;
1;
@@
-983,9
+984,8
@@
$jsscript
. $locale->text('Continue') . qq|">
|;
. $locale->text('Continue') . qq|">
|;
- # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
- # Einlesen der Finanzamtdaten
- get_config($userspath, 'finanzamt.ini');
+ # Hier Aufruf von get_config zum Einlesen der Finanzamtdaten
+ USTVA->get_config($userspath, 'finanzamt.ini');
$disabled = qq|disabled="disabled"|;
$disabled = '' if ($form->{elster} eq '1');
$disabled = qq|disabled="disabled"|;
$disabled = '' if ($form->{elster} eq '1');
@@
-1354,7
+1354,7
@@
sub list_accounts {
$description = $form->escape($ref->{description});
$href =
$description = $form->escape($ref->{description});
$href =
- qq|ca.pl?path=$form->{path}&action=list_transactions&accounttype=$form->{accounttype}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&sort=transdate&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&eur=$form->{eur}&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title&nextsub=$form->{nextsub}&accno=$ref->{accno}&description=$description
"
;
+ qq|ca.pl?path=$form->{path}&action=list_transactions&accounttype=$form->{accounttype}&login=$form->{login}&password=$form->{password}&fromdate=$form->{fromdate}&todate=$form->{todate}&sort=transdate&l_heading=$form->{l_heading}&l_subtotal=$form->{l_subtotal}&department=$department&eur=$form->{eur}&projectnumber=$projectnumber&project_id=$form->{project_id}&title=$title&nextsub=$form->{nextsub}&accno=$ref->{accno}&description=$description
|
;
$ml = ($ref->{category} =~ /(A|C|E)/) ? -1 : 1;
$ml = ($ref->{category} =~ /(A|C|E)/) ? -1 : 1;
@@
-2003,21
+2003,36
@@
sub print {
sub print_form {
$lxdebug->enter_sub();
sub print_form {
$lxdebug->enter_sub();
+ my %replacements =
+ (
+ "ä" => "ae", "ö" => "oe", "ü" => "ue",
+ "Ä" => "Ae", "Ö" => "Oe", "Ü" => "Ue",
+ "ß" => "ss",
+ " " => "_"
+ );
+
$form->{statementdate} = $locale->date(\%myconfig, $form->{todate}, 1);
$form->{templates} = "$myconfig{templates}";
$form->{statementdate} = $locale->date(\%myconfig, $form->{todate}, 1);
$form->{templates} = "$myconfig{templates}";
-
$form->{IN} = "$form->{type}.
html";
-
+
my $suffix = "
html";
+ my $attachment_suffix = "html";
if ($form->{format} eq 'postscript') {
$form->{postscript} = 1;
if ($form->{format} eq 'postscript') {
$form->{postscript} = 1;
- $
form->{IN} =~ s/html$/tex/
;
- }
- if ($form->{format} eq 'pdf') {
+ $
suffix = "tex"
;
+ $attachment_suffix = "ps";
+
} els
if ($form->{format} eq 'pdf') {
$form->{pdf} = 1;
$form->{pdf} = 1;
- $form->{IN} =~ s/html$/tex/;
+ $suffix = "tex";
+ $attachment_suffix = "pdf";
}
}
+ $form->{IN} = "$form->{type}.$suffix";
+
+
+ # Save $form->{email} because it will be overwritten.
+ $form->{EMAIL_RECIPIENT} = $form->{email};
+
$i = 0;
while (@{ $form->{AG} }) {
$i = 0;
while (@{ $form->{AG} }) {
@@
-2074,6
+2089,9
@@
sub print_form {
$form->format_amount(\%myconfig, $form->{"${_}total"}, 2)
} (c0, c30, c60, c90, "");
$form->format_amount(\%myconfig, $form->{"${_}total"}, 2)
} (c0, c30, c60, c90, "");
+ $form->{attachment_filename} = $locale->text("Statement") . "_$form->{todate}.$attachment_suffix";
+ map({ $form->{attachment_filename} =~ s/$_/$replacements{$_}/g; } keys(%replacements));
+
$form->parse_template(\%myconfig, $userspath);
}
$form->parse_template(\%myconfig, $userspath);
}
@@
-2864,9
+2882,8
@@
sub generate_bwa {
sub generate_ustva {
$lxdebug->enter_sub();
sub generate_ustva {
$lxdebug->enter_sub();
- # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
- # Einlesen der Finanzamtdaten
- get_config($userspath, 'finanzamt.ini');
+ # Hier Aufruf von get_config zum Einlesen der Finanzamtdaten
+ USTVA->get_config($userspath, 'finanzamt.ini');
# &get_project(generate_bwa);
@anmeldungszeitraum =
# &get_project(generate_bwa);
@anmeldungszeitraum =