Revision 0246e125
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/USTVA.pm | ||
---|---|---|
941 | 941 |
|
942 | 942 |
} |
943 | 943 |
|
944 |
sub get_config { |
|
945 |
$main::lxdebug->enter_sub(); |
|
946 |
|
|
947 |
my ($self, $userpath, $filename) = @_; |
|
948 |
|
|
949 |
my $form = $main::form; |
|
950 |
|
|
951 |
if (!open(FACONF, "$userpath/$form->{login}_$filename")) { |
|
952 |
open(FANEW, ">$userpath/$form->{login}_$filename") || |
|
953 |
$form->error("$userpath/$filename : $!"); |
|
954 |
close(FANEW); |
|
955 |
open(FACONF, "$userpath/$form->{login}_$filename") || |
|
956 |
$form->error("$userpath/$form->{username}_$filename : $!"); |
|
957 |
} |
|
958 |
|
|
959 |
while (<FACONF>) { |
|
960 |
last if (/^\[/); |
|
961 |
next if (/^(\#|\s)/); |
|
962 |
|
|
963 |
# remove comments |
|
964 |
s/\s#.*//g; |
|
965 |
|
|
966 |
# remove any trailing whitespace |
|
967 |
s/^\s*(.*?)\s*$/$1/; |
|
968 |
my ($key, $value) = split(/=/, $_, 2); |
|
969 |
|
|
970 |
$form->{$key} = "$value"; |
|
971 |
|
|
972 |
} |
|
973 |
|
|
974 |
close(FACONF); |
|
975 |
|
|
976 |
$main::lxdebug->leave_sub(); |
|
977 |
} |
|
944 | 978 |
|
945 | 979 |
|
946 | 980 |
1; |
bin/mozilla/rp.pl | ||
---|---|---|
40 | 40 |
|
41 | 41 |
use SL::PE; |
42 | 42 |
use SL::RP; |
43 |
use SL::USTVA; |
|
43 | 44 |
|
44 | 45 |
1; |
45 | 46 |
|
... | ... | |
983 | 984 |
. $locale->text('Continue') . qq|"> |
984 | 985 |
|; |
985 | 986 |
|
986 |
# Hier Aufruf von get_config aus bin/mozilla/fa.pl zum |
|
987 |
# Einlesen der Finanzamtdaten |
|
988 |
get_config($userspath, 'finanzamt.ini'); |
|
987 |
# Hier Aufruf von get_config zum Einlesen der Finanzamtdaten |
|
988 |
USTVA->get_config($userspath, 'finanzamt.ini'); |
|
989 | 989 |
|
990 | 990 |
$disabled = qq|disabled="disabled"|; |
991 | 991 |
$disabled = '' if ($form->{elster} eq '1'); |
... | ... | |
1354 | 1354 |
$description = $form->escape($ref->{description}); |
1355 | 1355 |
|
1356 | 1356 |
$href = |
1357 |
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";
|
|
1357 |
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|;
|
|
1358 | 1358 |
|
1359 | 1359 |
$ml = ($ref->{category} =~ /(A|C|E)/) ? -1 : 1; |
1360 | 1360 |
|
... | ... | |
2864 | 2864 |
sub generate_ustva { |
2865 | 2865 |
$lxdebug->enter_sub(); |
2866 | 2866 |
|
2867 |
# Hier Aufruf von get_config aus bin/mozilla/fa.pl zum |
|
2868 |
# Einlesen der Finanzamtdaten |
|
2869 |
get_config($userspath, 'finanzamt.ini'); |
|
2867 |
# Hier Aufruf von get_config zum Einlesen der Finanzamtdaten |
|
2868 |
USTVA->get_config($userspath, 'finanzamt.ini'); |
|
2870 | 2869 |
|
2871 | 2870 |
# &get_project(generate_bwa); |
2872 | 2871 |
@anmeldungszeitraum = |
bin/mozilla/ustva.pl | ||
---|---|---|
88 | 88 |
$form->header; |
89 | 89 |
|
90 | 90 |
# Einlesen der Finanzamtdaten |
91 |
&get_config($userspath, 'finanzamt.ini');
|
|
91 |
USTVA->get_config($userspath, 'finanzamt.ini');
|
|
92 | 92 |
|
93 | 93 |
# Hier Einlesen der user-config |
94 | 94 |
# steuernummer entfernt f?r prerelease |
... | ... | |
528 | 528 |
sub generate_ustva { |
529 | 529 |
$lxdebug->enter_sub(); |
530 | 530 |
|
531 |
# Aufruf von get_config aus bin/mozilla/ustva.pl zum |
|
532 |
# Einlesen der Finanzamtdaten aus finanzamt.ini |
|
531 |
# Aufruf von get_config zum Einlesen der Finanzamtdaten aus finanzamt.ini |
|
533 | 532 |
|
534 |
get_config($userspath, 'finanzamt.ini'); |
|
533 |
USTVA->get_config($userspath, 'finanzamt.ini');
|
|
535 | 534 |
|
536 | 535 |
# init some form vars |
537 | 536 |
my @anmeldungszeitraum = |
... | ... | |
1056 | 1055 |
# edit all taxauthority prefs |
1057 | 1056 |
|
1058 | 1057 |
$form->header; |
1059 |
&get_config($userspath, 'finanzamt.ini');
|
|
1058 |
USTVA->get_config($userspath, 'finanzamt.ini');
|
|
1060 | 1059 |
|
1061 | 1060 |
my $land = $form->{elsterland}; |
1062 | 1061 |
my $amt = $form->{elsterFFFF}; |
... | ... | |
1145 | 1144 |
my $elster_amt = ''; |
1146 | 1145 |
my $elsterFFFF = ''; |
1147 | 1146 |
my $elstersteuernummer = ''; |
1148 |
&get_config($userspath, 'finanzamt.ini')
|
|
1147 |
USTVA->get_config($userspath, 'finanzamt.ini')
|
|
1149 | 1148 |
if ($form->{saved} eq $locale->text('saved')); |
1150 | 1149 |
|
1151 | 1150 |
# Auf ?bergabefehler checken |
... | ... | |
1312 | 1311 |
$lxdebug->leave_sub(); |
1313 | 1312 |
} |
1314 | 1313 |
|
1315 |
sub get_config { |
|
1316 |
$lxdebug->enter_sub(); |
|
1317 |
|
|
1318 |
my ($userpath, $filename) = @_; |
|
1319 |
my ($key, $value) = ''; |
|
1320 |
open(FACONF, "$userpath/$form->{login}_$filename") |
|
1321 |
or #falls Datei nicht vorhanden ist |
|
1322 |
sub { |
|
1323 |
open(FANEW, ">$userpath/$form->{login}_$filename") |
|
1324 |
or $form->error("$userpath/$filename : $!"); |
|
1325 |
close FANEW; |
|
1326 |
open(FACONF, "$userpath/$form->{login}_$filename") |
|
1327 |
or $form->error("$userpath/$form->{username}_$filename : $!"); |
|
1328 |
}; |
|
1329 |
while (<FACONF>) { |
|
1330 |
last if /^\[/; |
|
1331 |
next if /^(#|\s)/; |
|
1332 |
|
|
1333 |
# remove comments |
|
1334 |
s/\s#.*//g; |
|
1335 |
|
|
1336 |
# remove any trailing whitespace |
|
1337 |
s/^\s*(.*?)\s*$/$1/; |
|
1338 |
($key, $value) = split /=/, $_, 2; |
|
1339 |
|
|
1340 |
$form->{$key} = "$value"; |
|
1341 |
|
|
1342 |
} |
|
1343 |
close FACONF; |
|
1344 |
|
|
1345 |
$lxdebug->leave_sub(); |
|
1346 |
} |
|
1347 |
|
|
1348 | 1314 |
sub save { |
1349 | 1315 |
$lxdebug->enter_sub(); |
1350 | 1316 |
my $filename = "$form->{login}_$form->{filename}"; |
locale/de/ustva | ||
---|---|---|
115 | 115 |
'debug' => 'debug', |
116 | 116 |
'elster_hash' => 'elster_hash', |
117 | 117 |
'generate_ustva' => 'generate_ustva', |
118 |
'get_config' => 'get_config', |
|
119 | 118 |
'gl_transaction' => 'gl_transaction', |
120 | 119 |
'help' => 'help', |
121 | 120 |
'name_selected' => 'name_selected', |
Auch abrufbar als: Unified diff
Funktion get_config aus ustva.pl nach USTVA.pm verschoben, damit sie auch aus rp.pl aufgerufen werden kann.