From f59c9111f911e0c4d418d9b126483970cef4df5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Wed, 9 Sep 2020 23:14:16 +0200 Subject: [PATCH] =?utf8?q?USTVA:=20Toter=20Code=20(ca.=202012=20abw=C3=A4r?= =?utf8?q?ts)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - Typo - Kommentare S.a. doc/CHANGELOG: Die Druckvorlagen für USTVA vor 2012 wurden entfernt und das Ausdrucken von USTVA als PDF ist deprecated. Da die Eingabe von Erklärungen als PDF nicht mehr gestattet ist, sollten Archivkopien der USTVA direkt bei Elster bezogen werden, oder auf anderem Wege erstellt werden. Der Prozess dazu wird sich in einer kommenden Version ändern --- SL/USTVA.pm | 5 +- bin/mozilla/ustva.pl | 140 +++---------------------------------------- 2 files changed, 9 insertions(+), 136 deletions(-) diff --git a/SL/USTVA.pm b/SL/USTVA.pm index 556698e8c..1453562ee 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -460,11 +460,8 @@ sub query_finanzamt { sub process_query { $main::lxdebug->enter_sub(); - # Copyright D. Simander -> SL::Form under Gnu GPL. my ($form, $dbh, $filename) = @_; - # return unless (-f $filename); - open my $FH, "<", "$filename" or $form->error("$filename : $!\n"); my $query = ""; my $sth; @@ -594,7 +591,7 @@ sub ustva { # Fixme: Wird auch noch für Oesterreich gebraucht, # weil kein eigenes Ausgabeformular - # sotte aber aus der allgeméinen Steuerberechnung verschwinden + # sollte aber aus der allgemeinen Steuerberechnung verschwinden # # Berechnung der USTVA Formularfelder laut Bogen 207 # diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index 3f0b0a296..0f26de3f6 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -30,14 +30,6 @@ use utf8; require "bin/mozilla/common.pl"; -#use strict; -#no strict 'refs'; -#use diagnostics; -#use warnings; # FATAL=> 'all'; -#use vars qw($locale $form %myconfig); -#our ($myconfig); -#use CGI::Carp "fatalsToBrowser"; - use List::Util qw(first); use SL::DB::Default; @@ -245,32 +237,6 @@ sub report { } - -sub help { - $::lxdebug->enter_sub(); - - $::auth->assert('advance_turnover_tax_return'); - - # parse help documents under doc - $::form->{templates} = 'doc'; - $::form->{help} = 'ustva'; - $::form->{type} = 'help'; - $::form->{format} = 'html'; - generate_ustva(); - - $::lxdebug->leave_sub(); -} - -sub show { - $::lxdebug->enter_sub(); - - $::auth->assert('advance_turnover_tax_return'); - - #generate_ustva(); - $::lxdebug->leave_sub(); - call_sub($::form->{"nextsub"}); -} - sub ustva_vorauswahl { $::lxdebug->enter_sub(); @@ -501,12 +467,6 @@ sub ustva_vorauswahl { return $select_vorauswahl; } -#sub config { -# $::lxdebug->enter_sub(); -# config_step1(); -# $::lxdebug->leave_sub(); -#} - sub show_options { $::lxdebug->enter_sub(); @@ -554,9 +514,6 @@ sub generate_ustva { $::auth->assert('advance_turnover_tax_return'); my $defaults = SL::DB::Default->get; - $form->error($::locale->text('No print templates have been created for this client yet. Please do so in the client configuration.')) if !$defaults->templates; - $form->{templates} = $defaults->templates; - my $ustva = USTVA->new(); $ustva->get_config(); @@ -636,42 +593,10 @@ sub generate_ustva { $form->{co_city} =~ s/\\n//g; } - ################################ - # - # Nation specific customisations - # - ################################ - - # Germany - - if ( $form->{coa} eq 'Germany-DATEV-SKR03EU' or $form->{coa} eq 'Germany-DATEV-SKR04EU') { - $form->{id} = []; $form->{amount} = []; - if ( $form->{format} eq 'pdf' or $form->{format} eq 'postscript') { - - $form->{IN} = "$form->{type}-$form->{year}.tex"; - $form->{padding} = "~~"; - $form->{bold} = "\textbf{"; - $form->{endbold} = "}"; - $form->{br} = '\\\\'; - - # Zahlenformatierung für Latex USTVA Formulare - - foreach my $number (@{$::form->{category_euro}}) { - $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '0', ''); - } - - my ${decimal_comma} = ( $myconfig{numberformat} eq '1.000,00' - or $myconfig{numberformat} eq '1000,00' ) ? ',':'.'; - - foreach my $number (@{$::form->{category_cent}}) { - $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '2', ''); - $form->{$number} =~ s/${decimal_comma}/~~/g; - } - - } elsif ( $form->{format} eq 'html') { # Formatierungen für HTML Ausgabe + if ( $form->{format} eq 'html') { # Formatierungen für HTML Ausgabe $form->{IN} = $form->{type} . '.html'; $form->{padding} = "  "; @@ -687,40 +612,11 @@ sub generate_ustva { foreach my $number (@{$::form->{category_euro}}) { $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '0', '0'); } - } elsif ( $form->{format} eq '' ){ # No format error. - - $form->header; - USTVA::error( $locale->text('Application Error. No Format given' ) . "!"); - $::dispatcher->end_request; - - } else { # All other Formats are wrong + } else { # we have only html $form->header; USTVA::error( $locale->text('Application Error. Wrong Format') . ": " . $form->{format} ); $::dispatcher->end_request; - } - - - } else # Outputformat for generic output - { - die ("not used anymore"); - $form->{USTVA} = []; - if ( $form->{format} eq 'generic') { # Formatierungen für HTML Ausgabe - - my $rec_ref = {}; - for my $kennziffer (@{$::form->{category_cent}}, @{$::form->{category_euro}}) { - $rec_ref = {}; - $rec_ref->{id} = $kennziffer; - $rec_ref->{amount} = $form->format_amount(\%myconfig, $form->{$kennziffer}, 2, '0'); - - $::lxdebug->message($LXDebug::DEBUG, "Kennziffer $kennziffer: '$form->{$kennziffer}'" ); - $::lxdebug->dump($LXDebug::DEBUG, $rec_ref ); - push @ { $form->{USTVA} }, $rec_ref; - } - - } - - } - + } if ( $form->{period} eq '13' and $form->{format} ne 'html') { $form->header; USTVA::info( @@ -729,32 +625,12 @@ sub generate_ustva { . '!'); } - $form->{templates} = "doc" if ( $form->{type} eq 'help' ); - - if ($form->{format} eq 'generic'){ - die ("not used anymore"); - $form->header(); + # add a prefix for ustva pos numbers, i.e.: 81 -> post_ustva_81 + $form->{"pos_ustva_$_"} = $form->{$_} for grep { m{^\d+} } keys %{ $form }; + $form->{title} = $locale->text('Advance turnover tax return'); - my $template_ref = { - taxnumber => $defaults->taxnumber, - }; - - print($form->parse_html_template('ustva/generic_taxreport', $template_ref)); - - } elsif ( $form->{format} eq 'elstertaxbird' ) { - die ("not used anymore"); - $form->parse_template(\%myconfig); - } else - { - # add a prefix for ustva pos numbers, i.e.: 81 -> post_ustva_81 - $form->{"pos_ustva_$_"} = $form->{$_} for grep { m{^\d+} } keys %{ $form }; - $form->{title} = $locale->text('Advance turnover tax return'); - - $form->header; - print $form->parse_html_template('ustva/ustva'); - - - } + $form->header; + print $form->parse_html_template('ustva/ustva'); $::lxdebug->leave_sub(); } -- 2.20.1