X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fustva.pl;h=b7b66fbbcf4bc40b4ebdbd5d7c5ca5d24c51cfbe;hb=2f23933db5d24e9da91fd079a1d0c362dad344f7;hp=64e509ebcd84db8d1eb799e98d13a52068bd9512;hpb=81afc40ac402001c739b440e6f06b6b3da4dc646;p=kivitendo-erp.git diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index 64e509ebc..b7b66fbbc 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -833,6 +833,7 @@ sub generate_ustva { $file .= $form->{elstersteuernummer}; #file suffix $file .= '.xml'; + $file =~ s|.*/||; $form->{tmpfile} = "$userspath/$file"; $form->{attachment_filename} = $file; @@ -882,6 +883,7 @@ sub generate_ustva { $form->{attachment_filename} = "USTVA-" . $form->{period} . sprintf("%02d", $form->{year} % 100) . ".txb"; + $form->{attachment_filename} =~ s|.*/||; $form->{tmpfile} = "$userspath/" . $form->{attachment_filename}; # TODO: set Output to UTF-8 or system Preference @@ -1343,27 +1345,29 @@ sub save { # Hier kommt dann die Plausibilitätsprüfung der ELSTERSteuernummer if ($form->{elstersteuernummer} ne '000000000') { + $form->{elster} = '1'; - open(CONF, ">$userspath/$filename") or $form->error("$filename : $!"); + + open my $ustvaconfig, ">", "$userspath/$filename" or $form->error("$filename : $!"); # create the config file - print CONF qq|# Configuration file for USTVA\n\n|; + print {$ustvaconfig} qq|# Configuration file for USTVA\n\n|; my $key = ''; foreach $key (sort @config) { $form->{$key} =~ s/\\/\\\\/g; # strip M $form->{$key} =~ s/\r\n/\n/g; - print CONF qq|$key=|; + print {$ustvaconfig} qq|$key=|; if ($form->{$key} ne 'Y') { - print CONF qq|$form->{$key}\n|; + print {$ustvaconfig} qq|$form->{$key}\n|; } if ($form->{$key} eq 'Y') { - print CONF qq|checked \n|; + print {$ustvaconfig} qq|checked \n|; } } - print CONF qq|\n\n|; - close CONF; + print {$ustvaconfig} qq|\n\n|; + close $ustvaconfig; $form->{saved} = $locale->text('saved'); } else {