From a205ed210bf303bff2af7abcedf128c61d957f3a Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Thu, 25 Jan 2007 17:17:52 +0000 Subject: [PATCH] - USTVA Screens in HTML-Templates verlagert - USTVA Taxbird kleinere Anpassungen zur Kompatibilitaet - quoting - changelog angepasst --- SL/USTVA.pm | 144 ++- bin/mozilla/ustva.pl | 1126 ++++------------- doc/changelog | 4 + templates/webpages/ustva/config_step1_de.html | 113 ++ .../webpages/ustva/config_step1_master.html | 113 ++ templates/webpages/ustva/config_step2_de.html | 203 +++ .../webpages/ustva/config_step2_master.html | 204 +++ templates/webpages/ustva/report_de.html | 226 ++++ templates/webpages/ustva/report_master.html | 227 ++++ 9 files changed, 1433 insertions(+), 927 deletions(-) create mode 100644 templates/webpages/ustva/config_step1_de.html create mode 100644 templates/webpages/ustva/config_step1_master.html create mode 100644 templates/webpages/ustva/config_step2_de.html create mode 100644 templates/webpages/ustva/config_step2_master.html create mode 100644 templates/webpages/ustva/report_de.html create mode 100644 templates/webpages/ustva/report_master.html diff --git a/SL/USTVA.pm b/SL/USTVA.pm index 59e41b7b0..97a8a6fde 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -63,38 +63,40 @@ sub create_steuernummer { sub steuernummer_input { $main::lxdebug->enter_sub(); - ($elsterland, $elsterFFFF, $steuernummer) = @_; + my ($self, $elsterland, $elsterFFFF, $steuernummer) = @_; + my $steuernummer_input = ''; + $elster_land = $elsterland; $elster_FFFF = $elsterFFFF; $steuernummer = '0000000000' if ($steuernummer eq ''); # $steuernummer formatieren (nur Zahlen) -> $stnr - $stnr = $steuernummer; + my $stnr = $steuernummer; $stnr =~ s/\D+//g; #Pattern description Elstersteuernummer my %elster_STNRformat = ( - 'Mecklenburg Vorpommern' => 'FFF/BBB/UUUUP', # '/' 3 - 'Hessen' => '0FF BBB UUUUP', # ' ' 3 - 'Nordrhein Westfalen' => 'FFF/BBBB/UUUP', # '/' 3 - 'Schleswig Holstein' => 'FF BBB UUUUP', # ' ' 2 - 'Berlin' => 'FF/BBB/UUUUP', # '/' 3 - 'Thüringen' => 'FFF/BBB/UUUUP', # '/' 3 - 'Sachsen' => 'FFF/BBB/UUUUP', # '/' 3 - 'Hamburg' => 'FF/BBB/UUUUP', # '/' 3 - 'Baden Würtemberg' => 'FF/BBB/UUUUP', # '/' 2 - 'Sachsen Anhalt' => 'FFF/BBB/UUUUP', # '/' 3 - 'Saarland' => 'FFF/BBB/UUUUP', # '/' 3 - 'Bremen' => 'FF BBB UUUUP', # ' ' 3 - 'Bayern' => 'FFF/BBB/UUUUP', # '/' 3 - 'Rheinland Pfalz' => 'FF/BBB/UUUU/P', # '/' 4 - 'Niedersachsen' => 'FF/BBB/UUUUP', # '/' 3 - 'Brandenburg' => 'FFF/BBB/UUUUP', # '/' 3 + 'Mecklenburg Vorpommern' => 'FFF/BBB/UUUUP', # '/' 3 + 'Hessen' => '0FF BBB UUUUP', # ' ' 3 + 'Nordrhein Westfalen' => 'FFF/BBBB/UUUP', # '/' 3 + 'Schleswig Holstein' => 'FF BBB UUUUP', # ' ' 2 + 'Berlin' => 'FF/BBB/UUUUP', # '/' 3 + 'Thüringen' => 'FFF/BBB/UUUUP', # '/' 3 + 'Sachsen' => 'FFF/BBB/UUUUP', # '/' 3 + 'Hamburg' => 'FF/BBB/UUUUP', # '/' 3 + 'Baden Würtemberg' => 'FF/BBB/UUUUP', # '/' 2 + 'Sachsen Anhalt' => 'FFF/BBB/UUUUP', # '/' 3 + 'Saarland' => 'FFF/BBB/UUUUP', # '/' 3 + 'Bremen' => 'FF BBB UUUUP', # ' ' 3 + 'Bayern' => 'FFF/BBB/UUUUP', # '/' 3 + 'Rheinland Pfalz' => 'FF/BBB/UUUU/P', # '/' 4 + 'Niedersachsen' => 'FF/BBB/UUUUP', # '/' 3 + 'Brandenburg' => 'FFF/BBB/UUUUP', # '/' 3 ); #split the pattern - $elster_pattern = $elster_STNRformat{$elster_land}; + my $elster_pattern = $elster_STNRformat{$elster_land}; my @elster_pattern = split(' ', $elster_pattern); my $delimiter = ' '; my $patterncount = @elster_pattern; @@ -108,76 +110,77 @@ sub steuernummer_input { # no we have an array of patternparts and a delimiter # create the first automated and fixed part and delimiter - print qq||; - $part = ''; + $steuernummer_input .= qq||; + my $part = ''; SWITCH: { $elster_pattern[0] eq 'FFF' && do { $part = substr($elster_FFFF, 1, 4); - print qq|$part|; + $steuernummer_input .= qq|$part|; last SWITCH; }; $elster_pattern[0] eq '0FF' && do { $part = '0' . substr($elster_FFFF, 2, 4); - print qq|$part|; + $steuernummer_input .= qq|$part|; last SWITCH; }; $elster_pattern[0] eq 'FF' && do { $part = substr($elster_FFFF, 2, 4); - print qq|$part|; + $steuernummer_input .= qq|$part|; last SWITCH; }; 1 == 1 && do { - print qq|Fehler!|; + $steuernummer_input .= qq|Fehler!|; last SWITCH; }; } #now the rest of the Steuernummer ... - print qq||; - print qq|\n + $steuernummer_input .= qq||; + $steuernummer_input .= qq|\n |; - my $h = 0; - my $i = 0; - my $j = 0; - $k = 0; - for ($h = 1; $h < $patterncount; $h++) { - print qq| $delimiter \n|; - for ($i = 1; $i <= length($elster_pattern[$h]); $i++) { - print qq|\n|; + $steuernummer_input .= qq|\n|; } } + $main::lxdebug->leave_sub(); + + return $steuernummer_input; } sub fa_auswahl { $main::lxdebug->enter_sub(); - use SL::Form; +# use SL::Form; # Referenz wird übergeben, hash of hash wird nicht # in neues Hash kopiert, sondern direkt über die Referenz verändert # Prototyp für diese Konstruktion - my ($land, $elsterFFFF, $elster_init) = - @_; #Referenz auf Hash von Hash übergeben + my ($self, $land, $elsterFFFF, $elster_init) = @_; + my $terminal = ''; my $FFFF = $elsterFFFF; my $ffff = ''; @@ -191,8 +194,7 @@ sub fa_auswahl { #} #if ( $terminal eq 'mozilla' or $terminal eq 'js' ) { - print qq| -
+ my $fa_auswahl = qq| @@ -236,18 +238,18 @@ sub fa_auswahl { |; if ($elsterFFFF eq '') { - print qq||; + $fa_auswahl .= qq||; } else { foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} } keys(%elster_land_fa) ) { - print qq| + $fa_auswahl .= qq| |; + $fa_auswahl .= qq|>$elster_land_fa{$ffff} ($ffff)|; } } - print qq| + $fa_auswahl .= qq| |; $main::lxdebug->leave_sub(); + return $fa_auswahl; } sub info { @@ -400,7 +403,8 @@ sub stichtag { sub query_finanzamt { $main::lxdebug->enter_sub(); - my ($myconfig, $form) = @_; + my ($self, $myconfig, $form) = @_; + my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr); #Test, if table finanzamt exist @@ -568,12 +572,18 @@ sub ustva { my $last_period = 0; my $category = "pos_ustva"; - my @category_cent = qw(511 861 36 80 971 931 98 96 53 74 - 85 65 66 61 62 67 63 64 59 69 39 83 - Z43 Z45 Z53 Z62 Z65 Z67); + my @category_cent = qw( + 511 861 36 80 971 931 98 96 53 74 + 85 65 66 61 62 67 63 64 59 69 + 39 83 Z43 Z45 Z53 Z62 Z65 Z67 + ); - my @category_euro = qw(41 44 49 43 48 51 86 35 77 76 91 97 93 - 95 94 42 60 45 52 73 84); + my @category_euro = qw( + 41 44 49 43 48 51 + 86 35 77 76 91 97 + 93 95 94 42 60 45 + 52 73 84 + ); $form->{decimalplaces} *= 1; @@ -792,4 +802,6 @@ sub get_accounts_ustva { $main::lxdebug->leave_sub(); } + + 1; diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index e0ff7a68b..daecb8d88 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -67,12 +67,15 @@ use SL::User; # $locale->text('Oct') # $locale->text('Nov') # $locale->text('Dec') + +# $form->parse_html_template('generic/util_hidden_variables'); + ############################# sub report { $lxdebug->enter_sub(); + my $myconfig = \%myconfig; - use CGI; $form->{title} = $locale->text('UStVA'); $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1 Nein=0 @@ -84,62 +87,39 @@ sub report { local $hide = ''; $form->header; - print qq| - -
{script}> - - - - - - - - - - - - - - -
$form->{title}
- - $department - |; - - # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum # Einlesen der Finanzamtdaten &get_config($userspath, 'finanzamt.ini'); # Hier Einlesen der user-config # steuernummer entfernt für prerelease - my @a = qw(signature name company address businessnumber tel fax email - co_chief co_department co_custom1 co_custom2 co_custom3 co_custom4 co_custom5 - co_name1 co_name2 - co_street co_street1 co_zip co_city co_city1 co_country co_tel co_tel1 co_tel2 - co_fax co_fax1 co_email co_email1 co_url co_url1 ustid duns - co_bankname co_bankname1 co_bankname2 co_bankname3 co_blz co_blz1 - co_blz2 co_blz3 co_accountnr co_accountnr1 co_accountnr2 co_accountnr3); + my @a = qw( + signature name company address businessnumber + tel fax email co_chief co_department + co_custom1 co_custom2 co_custom3 co_custom4 co_custom5 + co_name1 co_name2 co_street co_street1 co_zip + co_city co_city1 co_country co_tel co_tel1 + co_tel2 co_fax co_fax1 co_email co_email1 + co_url co_url1 ustid duns co_bankname + co_bankname1 co_bankname2 co_bankname3 co_blz co_blz1 + co_blz2 co_blz3 co_accountnr co_accountnr1 co_accountnr2 + co_accountnr3 + ); map { $form->{$_} = $myconfig->{$_} } @a; - my $oeffnungszeiten = $form->{FA_Oeffnungszeiten}; - $oeffnungszeiten =~ s/\\\\n/
/g; - print qq| - - |; - - if ($form->{FA_Name} ne '') { - print qq| - - - |; + ]; + + + my $template_ref = { + openings => $openings, + company_given => $company_given, + address_given => $address_given, + taxnumber_given => $taxnumber_given, + select_year => $select_year, + period_local => $period_local, + method_local => $method_local, + ustva_vorauswahl => $ustva_vorauswahl, + checkbox_kz_10 => $checkbox_kz_10, + tax_office_banks => $tax_office_banks_ref, + select_options => &show_options, + }; + + print($form->parse_html_template('ustva/report', $template_ref)); - #}# end if report = ustva - - print qq| -
-
- - | . $locale->text('Company') . qq| - - |; - if ($form->{company} ne '') { - print qq|

$form->{company}

\n|; - } else { - print qq| - {path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}> - | . $locale->text('No Company Name given') . qq|!
- |; - } + my $openings = $form->{FA_Oeffnungszeiten}; + $openings =~ s/\\\\n/
/g; + + my $company_given = ($form->{company} ne '') + ? qq|

$form->{company}

\n| + : qq|{path}&action=config| + . qq|&level=Programm--Preferences&login=$form->{login}| + . qq|&password=$form->{password}>| + . $locale->text('No Company Name given') . qq|!
|; + # Anpassungen der Variablennamen auf pre 2.1.1 Namen # klären, ob $form->{company_street|_address} gesetzt sind - # - if ($form->{address} ne '') { my $temp = $form->{address}; $temp =~ s/\\n/
/; @@ -147,343 +127,98 @@ sub report { $form->{co_city} =~ s/\\n//g; } - if ($form->{co_street} ne '' - and ( $form->{co_zip} ne '' - or $form->{co_city} ne '') - ) { - print qq| - $form->{co_street}
- $form->{co_street1}
- $form->{co_zip} $form->{co_city}|; - } else { - print qq| - {path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}> - | . $locale->text('No Company Address given') . qq|!\n|; - } + + my $address_given = + ($form->{co_street} ne '' + and ( + $form->{co_zip} ne '' + or $form->{co_city} ne '' + ) + ) + ? qq|$form->{co_street}
| + . qq|$form->{co_street1}
| + . qq|$form->{co_zip} $form->{co_city}| + : qq|{path}&action=config| + . qq|&level=Programm--Preferences&login=$form->{login}| + . qq|&password=$form->{password}>| + . $locale->text('No Company Address given') + . qq|!\n|; + $form->{co_email} = $form->{email} unless $form->{co_email}; $form->{co_tel} = $form->{tel} unless $form->{co_tel}; $form->{co_fax} = $form->{fax} unless $form->{co_fax}; $form->{co_url} = $form->{urlx} unless $form->{co_url}; - print qq| -
-
- | . $locale->text('Tel') . qq|.:  - $form->{co_tel} -
- | . $locale->text('Fax') . qq|.:nbsp; - $form->{co_fax} -
-
- $form->{co_email} -
-
- | . $locale->text('Tax Number') . qq|:  - |; + my $taxnumber_given = ($form->{steuernummer} ne '') + ? qq|$form->{steuernummer}| + : qq|{login}| + . qq|&password=$form->{password}">Keine Steuernummer hinterlegt!| + . qq|
|; - if ($form->{steuernummer} ne '') { - print qq|$form->{steuernummer}|; - } else { - print qq| - - Keine Steuernummer hinterlegt!
|; - } - print qq| -
- | . $locale->text('ELSTER Tax Number') . qq|:  - $form->{elstersteuernummer} -
-
- -
-
- |; - if ($form->{FA_steuerberater_name} ne '') { - print qq| -
- -   - | . $locale->text('Tax Consultant') . qq| - - - $form->{FA_steuerberater_name}
- $form->{FA_steuerberater_street}
- $form->{FA_steuerberater_city}
- Tel: $form->{FA_steuerberater_tel}
-
-
- |; - } - print qq| -
- - | . $locale->text('Tax Period') . qq| - - |; - &ustva_vorauswahl(); + my $ustva_vorauswahl = &ustva_vorauswahl(); - my @years = (); - if (not defined $form->{all_years}) { + my @all_years = $form->all_years(\%myconfig); - # accounting years if SQL-Ledger Version < 2.4.1 - # $year = $form->{year} * 1; - @years = sort { $b <=> $a } (2003 .. ($year + 1)); - $form->{all_years} = \@years; + my $select_year = qq| - |; - my $key = ''; - foreach $key (@years) { - print qq| - |; - } - - my $voranmeld = $form->{FA_voranmeld}; - print qq| |; - my $checked = ''; - $checked = "checked" if ($form->{kz10} eq '1'); - print qq| - - | . $locale->text('Amended Advance Turnover Tax Return') . qq| -
- |; - - if ($voranmeld ne '') { - print qq| -
- | . $locale->text($voranmeld) . qq| - |; - print $locale->text('With Extension Of Time') if ($form->{FA_dauerfrist} eq '1'); - print qq| - -
- |; - } - if ($form->{method} ne '') { - print qq|| . $locale->text('Method') . qq|: |; - print qq|| . $locale->text('accrual') . qq|| - if ($form->{method} eq 'accrual'); - print qq|| . $locale->text('cash') . qq|| if ($form->{method} eq 'cash'); - } - print qq| -
- -
-
- - | . $locale->text('Tax Office') . qq| - -

$form->{FA_Name}

- |; - - #if ($form->{FA_Ergaenzung_Name ne ''}){ - # print qq| - # $form->{FA_Ergaenzung_Name}  - #
- # |; - #} - print qq| - $form->{FA_Strasse} -
- $form->{FA_PLZ}   $form->{FA_Ort} -
-
- | . $locale->text('Tel') . qq|.:  - $form->{FA_Telefon} -
- | . $locale->text('Fax') . qq|.:$nbsp; - $form->{FA_Fax} -
-
- {steuernummer}:") - . qq|&body=| - . CGI::escape( - "Sehr geehrte Damen und Herren,\n\n\nMit freundlichen Grüßen\n\n") - . CGI::escape($form->{signature}) . qq|"> - $form->{FA_Email} - -
- - $form->{FA_Internet} - -
-
- | . $locale->text('Openings') . qq| -
- $oeffnungszeiten -
- |; - - my $FA_1 = - ( $form->{FA_BLZ_1} ne '' - && $form->{FA_Kontonummer_1} ne '' - && $form->{FA_Bankbezeichnung_1} ne ''); - my $FA_2 = - ( $form->{FA_BLZ_2} ne '' - && $form->{FA_Kontonummer_2} ne '' - && $form->{FA_Bankbezeichnung_oertlich} ne ''); - - if ($FA_1 && $FA_2) { - print qq| -
- | . $locale->text('Bank Connection') . qq| - - - - - -
- $form->{FA_Bankbezeichnung_1} -
- | . $locale->text('Account') . qq|:  - $form->{FA_Kontonummer_1} -
- | . $locale->text('Bank Code') . qq|:  - $form->{FA_BLZ_1} -
- $form->{FA_Bankbezeichnung_oertlich} -
- | . $locale->text('Account') . qq|:  - $form->{FA_Kontonummer_2} -
- | . $locale->text('Bank Code') . qq|:  - $form->{FA_BLZ_2} -
-
|; - } elsif ($FA_1) { - print qq| -
- | . $locale->text('Bank Connection') . qq| -
-
- $form->{FA_Bankbezeichnung_1} -
- | . $locale->text('Account') . qq|:  - $form->{FA_Kontonummer_1} -
- | . $locale->text('Bank Code') . qq|:  - $form->{FA_BLZ_1}
-
|; - } elsif ($FA_2) { - print qq| -
- | . $locale->text('Bank Connection') . qq| -
-
- $form->{FA_Bankbezeichnung_oertlich} -
- | . $locale->text('Account') . qq|:  - $form->{FA_Kontonummer_2} -
- | . $locale->text('Bank Code') . qq|:  - $form->{FA_BLZ_2} - |; + $select_year .= qq||; + + my $_checked = ''; + $_checked = "checked" if ($form->{kz10} eq '1'); + my $checkbox_kz_10 = qq|| + . $locale->text('Amended Advance Turnover Tax Return'); + + my $method_local = ($form->{method} eq 'accrual') ? $locale->text('accrual') + : ($form->{method} eq 'cash') ? $locale->text('cash') + : ''; + + my $period_local = ( $form->{FA_voranmeld} eq 'month') ? $locale->text('month') + : ( $form->{FA_voranmeld} eq 'quarter') ? $locale->text('quarter') + : ''; + + my $tax_office_banks_ref = [ + { BLZ => $form->{FA_BLZ_1}, + Kontonummer => $form->{FA_Kontonummer_1}, + Bankbezeichnung => $form->{FA_Bankbezeichnung_1} + }, + { BLZ => $form->{FA_BLZ_2}, + Kontonummer => $form->{FA_Kontonummer_2}, + Bankbezeichnung => $form->{FA_Bankbezeichnung_oertlich} } - print qq| - -
-
-
- - | . $locale->text('Outputformat') . qq| - - |; - - &show_options; - my $ausgabe = '1'; - print qq| -
- |; - - } else { - print qq| -
-
- - | . $locale->text('Hints') . qq| - -

| - . $locale->text('Missing Preferences: Outputroutine disabled') - . qq|

-

| . $locale->text('Help') . qq|

-
    -
  • | . $locale->text('Hint-Missing-Preferences') . qq|
  • -
-
- |; - my $ausgabe = ''; - $hide = q|disabled="disabled"|; - } - - print qq| -
-

- -
- - - - - - - - - - - - -
- - - - - - -
- |; - print qq| - - - |; $lxdebug->leave_sub(); } -############################# + sub help { $lxdebug->enter_sub(); @@ -513,6 +248,8 @@ sub show { sub ustva_vorauswahl { $lxdebug->enter_sub(); + my $select_vorauswahl; + #Aktuelles Datum zerlegen: my $date = $form->datetonum($form->current_date(\%myconfig), \%myconfig); @@ -533,12 +270,12 @@ sub ustva_vorauswahl { #$form->{day}= '11'; #$form->{month}= '01'; #$form->{year}= 2004; - print qq| + $select_vorauswahl = qq| {day}> {month}> - |; + |; if ($form->{FA_voranmeld} eq 'month') { @@ -623,18 +360,18 @@ sub ustva_vorauswahl { }; } - print qq||; + $select_vorauswahl .= qq||; } elsif ($form->{FA_voranmeld} eq 'quarter') { @@ -674,23 +411,23 @@ sub ustva_vorauswahl { }; } - print qq| + $select_vorauswahl .= qq|\n |; } else { # keine Vorauswahl bei Voranmeldungszeitraum - print qq||; + $select_vorauswahl .= qq||; } $lxdebug->leave_sub(); + + return $select_vorauswahl; } -sub config { - $lxdebug->enter_sub(); - edit(); - $lxdebug->leave_sub(); -} +#sub config { +# $lxdebug->enter_sub(); +# config_step1(); +# $lxdebug->leave_sub(); +#} sub debug { $lxdebug->enter_sub(); @@ -775,13 +514,15 @@ sub show_options { } #$format .= qq||; - print qq| + my $show_options = qq| $type $media |; $lxdebug->leave_sub(); + + return $show_options; } sub generate_ustva { @@ -1130,8 +871,7 @@ sub generate_ustva { $form->{taxbird_land_nr} = $lands{$land} if ($form->{elsterland} eq $land ); } - $form->{taxbird_steuernummer} = $form->{steuernummer}; - $form->{taxbird_steuernummer} =~ s/\D//g; + $form->{co_zip} = $form->{co_city}; $form->{co_zip} =~ s/\D//g; @@ -1139,6 +879,12 @@ sub generate_ustva { $form->{co_city} =~ s/^\s//g; ($form->{co_phone_prefix}, $form->{co_phone}) = split("-", $form->{tel}); + $form->{co_phone_prefix} =~ s/\s//g; + $form->{co_phone} =~ s/\s//g; + + $form->{taxbird_steuernummer} = $form->{steuernummer}; +# $form->{taxbird_steuernummer} =~ s/\D//g; + $form->{taxbird_steuernummer} =~ s/\///; # ersten Querstrich ersetzen # Numberformatting for Taxbird @@ -1196,7 +942,7 @@ sub generate_ustva { $lxdebug->leave_sub(); } -sub edit { +sub config_step1 { $lxdebug->enter_sub(); # edit all taxauthority prefs @@ -1204,194 +950,89 @@ sub edit { $form->header; &get_config($userspath, 'finanzamt.ini'); - #&create_steuernummer; - my $land = $form->{elsterland}; my $amt = $form->{elsterFFFF}; - my $callback = ''; - $callback = - "$form->{cbscript}?action=edit&login=$form->{cblogin}&path=$form->{cbpath}&root=$form->{cbroot}&rpw=$form->{cbrpw}" - if ($form->{cbscript} ne '' and $form->{cblogin} ne ''); + + if ($form->{cbscript} ne '' and $form->{cblogin} ne '') { + $callback = qq|$form->{cbscript}| + .qq|?action="config_step1"| + .qq|&login="$form->{cblogin}"| + .qq|&path="$form->{cbpath}"| + .qq|&root="$form->{cbroot}"| + .qq|&rpw="$form->{cbrpw}"|; + } $form->{title} = $locale->text('Tax Office Preferences'); - print qq| - -
- - - - - - - -
| - . $locale->text('Tax Office Preferences') . qq|
-
-
- | - . $locale->text('Local Tax Office Preferences') . qq| - |; - #print qq|$form->{terminal}|; - USTVA::fa_auswahl($land, $amt, &elster_hash()); - print qq| -
-
- |; - my $checked = ''; - $checked = "checked" if ($form->{method} eq 'accrual'); - print qq| -
- | . $locale->text('Taxation') . qq| - - - -
- |; - $checked = ''; - $checked = "checked" if ($form->{method} eq 'cash'); - print qq| - - -
-
-
- | . $locale->text('Tax Period') . qq| - - |; - $checked = ''; - $checked = "checked" if ($form->{FA_voranmeld} eq 'month'); - print qq| - - -
- |; - $checked = ''; - $checked = "checked" if ($form->{FA_voranmeld} eq 'quarter'); - print qq| - - -
- |; - $checked = ''; - $checked = "checked" if ($form->{FA_dauerfrist} eq '1'); - print qq| - - - -
-
-
- | . $locale->text('Tax Consultant') . qq| - - |; - $checked = ''; - $checked = "checked" if ($form->{FA_71} eq 'X'); - print qq| - - - - - - - - - - - - - -
- | . $locale->text('Name') . qq| - - | . $locale->text('Street') . qq| - - | . $locale->text('Zip, City') . qq| - - | . $locale->text('Telephone') . qq| -
- - - - - - - -
- -
- -
-
-
- - |; - print qq| - | if ($callback ne ''); - print qq| -     - - -
- |; + my $select_tax_office = USTVA->fa_auswahl($land, $amt, &elster_hash()); + my $checked_accrual = q|checked="checked"| if ($form->{method} eq 'accrual'); + my $checked_cash = q|checked="checked"| if ($form->{method} eq 'cash'); + my $checked_monthly = "checked" if ($form->{FA_voranmeld} eq 'month'); + my $checked_quarterly = "checked" if ($form->{FA_voranmeld} eq 'quarter'); + my $checked_dauerfristverlaengerung = "checked" if ($form->{FA_dauerfrist} eq '1'); + my $checked_kz_71 = "checked" if ($form->{FA_71} eq 'X'); - my @variables = qw( steuernummer elsterland elstersteuernummer elsterFFFF); - my $variable = ''; - foreach $variable (@variables) { - print qq| - |; - } - my $steuernummer_new = ''; + my $_hidden_variables_ref; - # - print qq| - - - - - {path}> - {login}> - {password}> - - |; + my %_hidden_local_variables = ( + 'saved' => $locale->text('Check Details'), + 'nextsub' => 'config_step2', + 'warnung' => '0', + ); + + foreach my $variable (keys %_hidden_local_variables) { + push @{ $_hidden_variables_ref }, + { 'variable' => $variable, 'value' => $_hidden_local_variables{$variable} }; + } - @variables = qw(FA_Name FA_Strasse FA_PLZ - FA_Ort FA_Telefon FA_Fax FA_PLZ_Grosskunden FA_PLZ_Postfach FA_Postfach - FA_BLZ_1 FA_Kontonummer_1 FA_Bankbezeichnung_1 FA_BLZ_2 - FA_Kontonummer_2 FA_Bankbezeichnung_oertlich FA_Oeffnungszeiten - FA_Email FA_Internet); + my @_hidden_form_variables = qw( + FA_Name FA_Strasse FA_PLZ + FA_Ort FA_Telefon FA_Fax + FA_PLZ_Grosskunden FA_PLZ_Postfach FA_Postfach + FA_BLZ_1 FA_Kontonummer_1 FA_Bankbezeichnung_1 + FA_BLZ_2 FA_Kontonummer_2 FA_Bankbezeichnung_oertlich + FA_Oeffnungszeiten FA_Email FA_Internet + steuernummer elsterland elstersteuernummer + elsterFFFF path login + password + ); - foreach $variable (@variables) { - print qq| - |; + foreach my $variable (@_hidden_form_variables) { + push @{ $_hidden_variables_ref}, + { 'variable' => $variable, 'value' => $form->{$variable} }; } - print qq| -
- -|; + # hä? kann die weg? + my $steuernummer_new = ''; + + # Variablen für das Template zur Verfügung stellen + my $template_ref = { + select_tax_office => $select_tax_office, + checked_accrual => $checked_accrual, + checked_cash => $checked_cash, + checked_monthly => $checked_monthly, + checked_quarterly => $checked_quarterly, + checked_dauerfristverlaengerung => $checked_dauerfristverlaengerung, + hidden_variables => $_hidden_variables_ref, + + }; + + # Ausgabe des Templates + print($form->parse_html_template('ustva/config_step1', $template_ref)); + $lxdebug->leave_sub(); } -sub edit_form { +sub config_step2 { $lxdebug->enter_sub(); $form->header(); - print qq| - - |; + +# print qq| +# +# |; + my $elsterland = ''; my $elster_amt = ''; my $elsterFFFF = ''; @@ -1417,7 +1058,6 @@ sub edit_form { $change = '0' if ($form->{saved} eq $locale->text('saved')); my $elster_init = &elster_hash(); - #my %elster_init = (); my %elster_init = %$elster_init; if ($change eq '1') { @@ -1428,7 +1068,8 @@ sub edit_form { $form->{elsterland} = $elsterland; $form->{elsterFFFF} = $elsterFFFF; $form->{steuernummer} = ''; - &create_steuernummer; + + create_steuernummer(); # rebuild elster_amt my $amt = ''; @@ -1461,109 +1102,69 @@ sub edit_form { my $patterncount = $form->{patterncount}; my $elster_pattern = $form->{elster_pattern}; my $delimiter = $form->{delimiter}; - my $steuernummer = ''; - $steuernummer = $form->{steuernummer} if ($steuernummer eq ''); - - #Warnung - my $warnung = $form->{warnung}; - - #printout form - print qq| -
- - - - - - - - - - - - - - -
| - . $locale->text('Tax Office Preferences') . qq|
-
- |; - &show_fa_daten; - print qq| -
-
-
- - | . $locale->text('Tax Number') . qq| - -
- |; - $steuernummer = - USTVA::steuernummer_input($form->{elsterland}, $form->{elsterFFFF}, - $form->{steuernummer}); - print qq| -
-
-
-
-
-
- - - |; - print qq|| - if ($form->{callback} eq ''); - - print qq| - | - if ($form->{callback} ne ''); - - if ($form->{warnung} eq "1") { - print qq| - - - - |; - } else { - print qq| - - - - |; - } + my $steuernummer = $form->{steuernummer} if ($steuernummer eq ''); - print qq| - -

$form->{saved}

-
- |; + $form->{FA_Oeffnungszeiten} =~ s/\\\\n/\n/g; + + + + my $input_steuernummer = USTVA->steuernummer_input( + $form->{elsterland}, + $form->{elsterFFFF}, + $form->{steuernummer} + ); + + $lxdebug->message(LXDebug::DEBUG1, qq|$input_steuernummer|); + + + my $_hidden_variables_ref; - my @variables = qw(FA_steuerberater_name FA_steuerberater_street - FA_steuerberater_city FA_steuerberater_tel - FA_voranmeld method - FA_dauerfrist FA_71 elster - path login password type elster_init saved + my %_hidden_local_variables = ( + 'elsterland' => $elsterland, + 'elsterFFFF' => $elsterFFFF, + 'warnung' => $warnung, + 'elstersteuernummer' => $elstersteuernummer, + 'steuernummer' => $stnr, + 'lastsub' => 'config_step1', + 'nextsub' => 'save', + ); - my $variable = ''; - foreach $variable (@variables) { - print qq| - |; + + foreach my $variable (keys %_hidden_local_variables) { + push @{ $_hidden_variables_ref }, + { 'variable' => $variable, 'value' => $_hidden_local_variables{$variable} }; } - print qq| - - - - - - -
- |; + + my @_hidden_form_variables = qw( + FA_steuerberater_name FA_steuerberater_street + FA_steuerberater_city FA_steuerberater_tel + FA_voranmeld method + FA_dauerfrist FA_71 + elster path + login password + type elster_init + saved callback + ); + + + + foreach my $variable (@_hidden_form_variables) { + push @{ $_hidden_variables_ref}, + { 'variable' => $variable, 'value' => $form->{$variable} }; + } + + my $template_ref = { + tax_office_data => $tax_office_data, + input_steuernummer => $input_steuernummer, + readonly => '', #q|disabled="disabled"|, + callback => $callback, + hidden_variables => $_hidden_variables_ref, + }; + + # Ausgabe des Templates + print($form->parse_html_template('ustva/config_step2', $template_ref)); + + $lxdebug->leave_sub(); } @@ -1628,18 +1229,11 @@ sub get_config { s/^\s*(.*?)\s*$/$1/; ($key, $value) = split /=/, $_, 2; - #if ($value eq ' '){ - # $form->{$key} = " " ; - #} elsif ($value ne ' '){ $form->{$key} = "$value"; - #} } close FACONF; - # Textboxen formatieren: Linebreaks entfernen - # - #$form->{FA_Oeffnungszeiten} =~ s/\\\\n/
/g; $lxdebug->leave_sub(); } @@ -1648,7 +1242,7 @@ sub save { my $filename = "$form->{login}_$form->{filename}"; #zuerst die steuernummer aus den part, parts_X_Y und delimiter herstellen - create_steuernummer; + create_steuernummer(); # Textboxen formatieren: Linebreaks entfernen # @@ -1678,10 +1272,9 @@ sub save { my $key = ''; foreach $key (sort @config) { $form->{$key} =~ s/\\/\\\\/g; - $form->{$key} =~ s/"/\\"/g; - # strip M $form->{$key} =~ s/\r\n/\n/g; + print CONF qq|$key=|; if ($form->{$key} ne 'Y') { print CONF qq|$form->{$key}\n|; @@ -1699,196 +1292,7 @@ sub save { $form->{saved} = $locale->text('Choose a Tax Number'); } - &edit_form; - $lxdebug->leave_sub(); -} - -sub show_fa_daten { - $lxdebug->enter_sub(); - my $readonly = $_; - my $oeffnungszeiten = $form->{FA_Oeffnungszeiten}; - $oeffnungszeiten =~ s/\\\\n/\n/g; - print qq|
-
- - | - . $locale->text('Tax Office') . qq| $form->{FA_Name} - - |; - - #print qq|\n

$form->{FA_Ergaenzung_Name} 

- # | if ( $form->{FA_Ergaenzung_Name} ); - print qq| - - - - - -
-
-
- - | . $locale->text('Address') . qq| - - - - - - - - - - - - - - - -
- | . $locale->text('Tax Office') . qq| -
- - -
- -
- - - -
-
-
-
- - | . $locale->text('Contact') . qq| - - | . $locale->text('Telephone') . qq|
- -
-
- | . $locale->text('Fax') . qq|
- -
-
- | . $locale->text('Internet') . qq|
- -
-
- -
-
-
-
-
- - | . $locale->text('Openings') . qq| - - -
-
- |; - my $FA_1 = - ( $form->{FA_BLZ_1} ne '' - && $form->{FA_Kontonummer_1} ne '' - && $form->{FA_Bankbezeichnung_1} ne ''); - my $FA_2 = - ( $form->{FA_BLZ_2} ne '' - && $form->{FA_Kontonummer_2} ne '' - && $form->{FA_Bankbezeichnung_oertlich} ne ''); - - if ($FA_1 && $FA_2) { - print qq| -
- - | - . $locale->text('Bank Connection Tax Office') . qq| - - - - - - -
- | . $locale->text('Bank') . qq| -
- -
-
- | . $locale->text('Account Nummer') . qq| -
- -
-
- | . $locale->text('Bank Code (long)') . qq| -
- -
- | . $locale->text('Bank') . qq| -
- -
-
- | . $locale->text('Account Nummer') . qq| -
- -
-
- | . $locale->text('Bank Code (long)') . qq| -
- -
-
- |; - } elsif ($FA_1) { - print qq| -
- - | - . $locale->text('Bank Connection Tax Office') . qq| - - | . $locale->text('Account Nummer') . qq| -
- -
-
- | . $locale->text('Bank Code (long)') . qq| -
- -
-
- | . $locale->text('Bank') . qq| -
- -
-
- |; - } else { - print qq| -
- - | - . $locale->text('Bank Connection Tax Office') . qq| - - | . $locale->text('Account Nummer') . qq| -
- -
-
- | . $locale->text('Bank Code (long)') . qq| -
- -
-
- | . $locale->text('Bank') . qq| -
- -
- |; - } - print qq| -
-
- |; + config_step2(); $lxdebug->leave_sub(); } @@ -1911,7 +1315,7 @@ sub back { sub elster_hash { $lxdebug->enter_sub(); - my $finanzamt = USTVA::query_finanzamt(\%myconfig, \%$form); + my $finanzamt = USTVA->query_finanzamt(\%myconfig, \%$form); $lxdebug->leave_sub(); return $finanzamt; } diff --git a/doc/changelog b/doc/changelog index 0f20e4fad..cf00aee55 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,10 @@ #################################### # Veraenderungen von Lx-Office ERP # #################################### + + - USTVA Screens in HTML-Templates verlagert + - USTVA Taxbird kleinere Anpassungen zur Kompatibilität + 2007-01-19 - Version 2.4.1 - CSV-Import auf Verwendung von Buchungsgruppen angepasst - Bei Einkaufs- und Verkaufsmasken lassen sich die zweiten Positionszeilen diff --git a/templates/webpages/ustva/config_step1_de.html b/templates/webpages/ustva/config_step1_de.html new file mode 100644 index 000000000..8ba180c5e --- /dev/null +++ b/templates/webpages/ustva/config_step1_de.html @@ -0,0 +1,113 @@ + + + +
+ + + + + + + +
Finanzamt - Einstellungen
+
+
+ Angaben zum Finanzamt +
+ +
+
+ +
+ Versteuerungs Verfahren + + > + +
+ > + +
+
+
+ Voranmeldungszeitraum + + + + > + +
+ > + +
+ > + + +
+
+
+ Steuerberater/-in + + + + + + + + + + + + + + +
+ Name + + Straße + + PLZ, Ort + + Telefon +
+ + + + + + + +
+ +
+ +
+
+
+ + +
+ + + + +
+ + diff --git a/templates/webpages/ustva/config_step1_master.html b/templates/webpages/ustva/config_step1_master.html new file mode 100644 index 000000000..ab985b4ef --- /dev/null +++ b/templates/webpages/ustva/config_step1_master.html @@ -0,0 +1,113 @@ + + + +
+ + + + + + + +
Tax Office Preferences
+
+
+ Local Tax Office Preferences +
+ +
+
+ +
+ Taxation + + > + +
+ > + +
+
+
+ Tax Period + + + + > + +
+ > + +
+ > + + +
+
+
+ Tax Consultant + + + + + + + + + + + + + + +
+ Name + + Street + + Zip, City + + Telephone +
+ + + + + + + +
+ +
+ +
+
+
+ + +
+ + + + +
+ + \ No newline at end of file diff --git a/templates/webpages/ustva/config_step2_de.html b/templates/webpages/ustva/config_step2_de.html new file mode 100644 index 000000000..b96318be9 --- /dev/null +++ b/templates/webpages/ustva/config_step2_de.html @@ -0,0 +1,203 @@ + + + + +
+ + + + + + + + + + + + + + +
+ Finanzamt - Einstellungen
+
+ +
+
+ + Finanzamt + + + + + + + +
+
+
+ + Adresse + + + + + + + + + + + + + + +
+ Finanzamt +
+ > + +
+ > +
+ > + + > +
+
+
+
+ + Kontakt + + Telefon
+ > +
+
+ Fax
+ > +
+
+ Internet
+ > +
+
+ > +
+
+
+
+
+ + Öffnungszeiten + + +
+
+
+ + Bankverbindung des Finanzamts + + + + + + +
+ Bank +
+ > +
+
+ Kontonummer +
+ > +
+
+ Bankleitzahl (BLZ) +
+ > +
+ Bank +
+ > +
+
+ Kontonummer +
+ > +
+
+ Bankleitzahl (BLZ) +
+ > +
+
+
+
+ + + +
+
+
+ + Steuernummer + +
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+
+ + + + + + diff --git a/templates/webpages/ustva/config_step2_master.html b/templates/webpages/ustva/config_step2_master.html new file mode 100644 index 000000000..12dd83bbc --- /dev/null +++ b/templates/webpages/ustva/config_step2_master.html @@ -0,0 +1,204 @@ + + + + +
+ + + + + + + + + + + + + + +
+ Tax Office Preferences
+
+ +
+
+ + Tax Office + + + + + + + +
+
+
+ + Address + + + + + + + + + + + + + + +
+ Tax Office +
+ > + +
+ > +
+ > + + > +
+
+
+
+ + Contact + + Telephone
+ > +
+
+ Fax
+ > +
+
+ Internet
+ > +
+
+ > +
+
+
+
+
+ + Openings + + +
+
+
+ + Bank Connection Tax Office + + + + + + +
+ Bank +
+ > +
+
+ Account Nummer +
+ > +
+
+ Bank Code (long) +
+ > +
+ Bank +
+ > +
+
+ Account Nummer +
+ > +
+
+ Bank Code (long) +
+ > +
+
+
+
+ + + +
+
+
+ + Tax Number + +
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+
+ + + + + + \ No newline at end of file diff --git a/templates/webpages/ustva/report_de.html b/templates/webpages/ustva/report_de.html new file mode 100644 index 000000000..749779079 --- /dev/null +++ b/templates/webpages/ustva/report_de.html @@ -0,0 +1,226 @@ + + + +
+ + + + + + + + + + + + + + +
+ + + + + +
+
+ + Firma + + + + + +
+
+ Tel.:  + +
+ Fax.:  + +
+
+ +
+
+ Steuernummer:  + +
+ ELSTER-Steuernummer:  + +
+
+ +
+
+ + +
+ + +  Steuerberater/-in + + +
+
+
+ Tel.
+
+
+
+ +
+ + Voranmeldungszeitraum + + + +
+ +
+ + + mit Dauerfristverlängerung + +
+
+ + + Verfahren: + +
+
+ + + +
+ + Finanzamt + +

+ + +
+     +
+
+ Tel.:  + +
+ Fax.:  + +
+
+ + + + +
+ + + +
+
+ Öffnungszeiten +
+ +
+
+ Bankverbindungen + + + + + + + + +
+ +
+ Konto:  + +
+ BLZ:  + +
+
+
+ +
+ +
+ + Ausgabeformat + + +
+ + + +
+
+ + Hinweise + +

+ Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert! +

+

Hilfe

+
    +
  • Bitte fehlende USTVA Einstellungen ergänzen (Menüpunkt: Programm)
  • +
+
+ + +
+

+ +
+ + + + + + + + + + + + +
+ + disabled="disabled" + type=submit class=submit name=action value="Zeigen"> + + + + +
+ + + + + + + diff --git a/templates/webpages/ustva/report_master.html b/templates/webpages/ustva/report_master.html new file mode 100644 index 000000000..17c6b0112 --- /dev/null +++ b/templates/webpages/ustva/report_master.html @@ -0,0 +1,227 @@ + + + +
+ + + + + + + + + + + + + + +
+ + + + + +
+
+ + Company + + + + + +
+
+ Tel.:  + +
+ Fax.:  + +
+
+ +
+
+ Tax Number:  + +
+ ELSTER Tax Number:  + +
+
+ +
+
+ + +
+ + +  Tax Consultant + + +
+
+
+ Tel.
+
+
+
+ +
+ + Tax Period + + + +
+ +
+ + + With Extension Of Time + +
+
+ + + Method: + +
+
+ + + +
+ + Tax Office + +

+ + +
+     +
+
+ Tel.:  + +
+ Fax.:  + +
+
+ + + + +
+ + + +
+
+ Openings +
+ +
+
+ Bank Connections + + + + + + + + +
+ +
+ Account:  + +
+ Bank Code:  + +
+
+
+ +
+ +
+ + Outputformat + + +
+ + + +
+
+ + Hints + +

+ Missing Preferences: Outputroutine + disabled +

+

Help

+
    +
  • Hint-Missing-Preferences
  • +
+
+ + +
+

+ +
+ + + + + + + + + + + + +
+ + disabled="disabled" + type=submit class=submit name=action value="Show"> + + + + +
+ + + + + + + \ No newline at end of file -- 2.20.1