- USTVA Screens in HTML-Templates verlagert
authorUdo Spallek <info@wissensvermittlung.com>
Thu, 25 Jan 2007 17:17:52 +0000 (17:17 +0000)
committerUdo Spallek <info@wissensvermittlung.com>
Thu, 25 Jan 2007 17:17:52 +0000 (17:17 +0000)
- USTVA Taxbird kleinere Anpassungen zur Kompatibilitaet
- quoting
- changelog angepasst

SL/USTVA.pm
bin/mozilla/ustva.pl
doc/changelog
templates/webpages/ustva/config_step1_de.html [new file with mode: 0644]
templates/webpages/ustva/config_step1_master.html [new file with mode: 0644]
templates/webpages/ustva/config_step2_de.html [new file with mode: 0644]
templates/webpages/ustva/config_step2_master.html [new file with mode: 0644]
templates/webpages/ustva/report_de.html [new file with mode: 0644]
templates/webpages/ustva/report_master.html [new file with mode: 0644]

index 59e41b7..97a8a6f 100644 (file)
@@ -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      = '&nbsp;';
   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|<b><font size="+1">|;
-  $part = '';
+  $steuernummer_input .= qq|<b><font size="+1">|;
+  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|</b></font>|;
-  print qq|\n
+  $steuernummer_input .= qq|</b></font>|;
+  $steuernummer_input .= qq|\n
            <input type=hidden name="elster_pattern" value="$elster_pattern">
            <input type=hidden name="patterncount" value="$patterncount">
            <input type=hidden name="patternlength" value="$patterncount">
            <input type=hidden name="delimiter" value="$delimiter">
            <input type=hidden name="part" value="$part">
   |;
-  my $h = 0;
-  my $i = 0;
-  my $j = 0;
-  $k = 0;
 
-  for ($h = 1; $h < $patterncount; $h++) {
-    print qq|&nbsp;$delimiter&nbsp;\n|;
-    for ($i = 1; $i <= length($elster_pattern[$h]); $i++) {
-      print qq|<select name="part_$h\_$i">\n|;
+  my $k = 0;
 
-      for ($j = 0; $j <= 9; $j++) {
-        print qq|      <option value="$j"|;
+  for (my $h = 1; $h < $patterncount; $h++) {
+    $steuernummer_input .= qq|&nbsp;$delimiter&nbsp;\n|;
+    for (my $i = 1; $i <= length($elster_pattern[$h]); $i++) {
+      $steuernummer_input .= qq|<select name="part_$h\_$i">\n|;
+
+      for (my $j = 0; $j <= 9; $j++) {
+        $steuernummer_input .= qq|      <option value="$j"|;
         if ($steuernummer ne '') {
           if ($j eq substr($stnr, length($part) + $k, 1)) {
-            print qq| selected|;
+            $steuernummer_input .= qq| selected|;
           }
         }
-        print qq|>$j</option>\n|;
+        $steuernummer_input .= qq|>$j</option>\n|;
       }
       $k++;
-      print qq|</select>\n|;
+      $steuernummer_input .= qq|</select>\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|
-        <br>
+  my $fa_auswahl = qq|
         <script language="Javascript">
         function update_auswahl()
         {
@@ -203,7 +205,7 @@ sub fa_auswahl {
                 |;
 
   foreach $elster_land (sort keys %$elster_init) {
-    print qq|
+    $fa_auswahl .= qq|
                if (elsterBLAuswahl.options[elsterBLAuswahl.selectedIndex].
                value == "$elster_land")
                {
@@ -217,14 +219,14 @@ sub fa_auswahl {
     foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
                    keys(%elster_land_fa)
       ) {
-      print qq|
+      $fa_auswahl .= qq|
                    elsterFAAuswahl.options[$j] = new Option("$elster_land_fa{$ffff} ($ffff)","$ffff");|;
       $j++;
     }
-    print qq|
+    $fa_auswahl .= qq|
                }|;
   }
-  print qq|
+  $fa_auswahl .= qq|
         }
         </script>
 
@@ -236,18 +238,18 @@ sub fa_auswahl {
             <td>
               <select size="1" name="elsterland_new" onchange="update_auswahl()">|;
   if ($land eq '') {
-    print qq|<option value="Auswahl" $checked>hier auswählen...</option>\n|;
+    $fa_auswahl .= qq|<option value="Auswahl" $checked>hier auswählen...</option>\n|;
   }
   foreach $elster_land (sort keys %$elster_init) {
-    print qq|
+    $fa_auswahl .= qq|
                   <option value="$elster_land"|;
     if ($elster_land eq $land and $checked eq '') {
-      print qq| selected|;
+      $fa_auswahl .= qq| selected|;
     }
-    print qq|>$elster_land</option>
+    $fa_auswahl .= qq|>$elster_land</option>
              |;
   }
-  print qq|
+  $fa_auswahl .= qq|
             </td>
           </tr>
           |;
@@ -259,34 +261,35 @@ sub fa_auswahl {
     $elster_land_fa{$FFFF} = $elster_init->{$elster_land}->{$FFFF}->[0];
   }
 
-  print qq|
+  $fa_auswahl .= qq|
            <tr>
               <td>Finanzamt
               </td>
               <td>
                  <select size="1" name="elsterFFFF_new">|;
   if ($elsterFFFF eq '') {
-    print qq|<option value="Auswahl" $checked>hier auswählen...</option>|;
+    $fa_auswahl .= qq|<option value="Auswahl" $checked>hier auswählen...</option>|;
   } else {
     foreach $ffff (sort { $elster_land_fa{$a} cmp $elster_land_fa{$b} }
                    keys(%elster_land_fa)
       ) {
 
-      print qq|
+      $fa_auswahl .= qq|
                         <option value="$ffff"|;
       if ($ffff eq $elsterFFFF and $checked eq '') {
-        print qq| selected|;
+        $fa_auswahl .= qq| selected|;
       }
-      print qq|>$elster_land_fa{$ffff} ($ffff)</option>|;
+      $fa_auswahl .= qq|>$elster_land_fa{$ffff} ($ffff)</option>|;
     }
   }
-  print qq|
+  $fa_auswahl .= qq|
                  </td>
               </tr>
             </table>
             </select>|;
 
   $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;
index e0ff7a6..daecb8d 100644 (file)
@@ -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|
- <body>
- <form method=post action=$form->{script}>
-
- <input type=hidden name=title value="$form->{title}">
-
- <table width=100%>
-  <tr>
-    <th class=listtop>$form->{title}</th>
-  </tr>
-  <tr height="5"></tr>
-  <tr>
-    <td>
-      <table>
-      $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/<br>/g;
-  print qq|
-       <tr >
-         <td width="50%" align="left" valign="top">
-         <fieldset>
-         <legend>
-         <b>| . $locale->text('Company') . qq|</b>
-         </legend>
-  |;
-  if ($form->{company} ne '') {
-    print qq|<h3>$form->{company}</h3>\n|;
-  } else {
-    print qq|
-           <a href=am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}>
-           | . $locale->text('No Company Name given') . qq|!</a><br>
-    |;
-  }
+  my $openings = $form->{FA_Oeffnungszeiten};
+  $openings =~ s/\\\\n/<br>/g;
+
+  my $company_given = ($form->{company} ne '') 
+    ? qq|<h3>$form->{company}</h3>\n|
+    : qq|<a href=am.pl?path=$form->{path}&action=config|
+      . qq|&level=Programm--Preferences&login=$form->{login}|
+      . qq|&password=$form->{password}>| 
+      . $locale->text('No Company Name given') . qq|!</a><br>|;
+
 
   # 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/<br \/>/;
@@ -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}<br>
-    $form->{co_street1}<br>
-    $form->{co_zip} $form->{co_city}|;
-    } else {
-    print qq|
-         <a href=am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}>
-         | . $locale->text('No Company Address given') . qq|!</a>\n|;
-  }
+
+  my $address_given = 
+    ($form->{co_street} ne '' 
+      and ( 
+        $form->{co_zip} ne ''
+          or $form->{co_city} ne ''
+      )
+    ) 
+    ? qq|$form->{co_street}<br>|
+        . qq|$form->{co_street1}<br>|
+        . qq|$form->{co_zip} $form->{co_city}|
+    : qq|<a href=am.pl?path=$form->{path}&action=config|
+        . qq|&level=Programm--Preferences&login=$form->{login}|
+        . qq|&password=$form->{password}>| 
+        . $locale->text('No Company Address given') 
+        . qq|!</a>\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|
-         <br>
-         <br>
-         | . $locale->text('Tel') . qq|.:&nbsp;
-         $form->{co_tel}
-         <br>
-         | . $locale->text('Fax') . qq|.:nbsp;
-         $form->{co_fax}         
-         <br>
-         <br>
-         $form->{co_email}       
-         <br>
-         <br>
-         | . $locale->text('Tax Number') . qq|:&nbsp;
-  |;
+  my $taxnumber_given = ($form->{steuernummer} ne '')
+    ? qq|$form->{steuernummer}|
+    : qq|<a href="ustva.pl?path=$form->{path}&action="config_step1"|
+      . qq|&level=Programm--Finanzamteinstellungen&login=$form->{login}|
+      . qq|&password=$form->{password}">Keine Steuernummer hinterlegt!|
+      . qq|</a><br>|;
 
-  if ($form->{steuernummer} ne '') {
-    print qq|$form->{steuernummer}|;
-  } else {
-    print qq|
-         <a href="ustva.pl?path=$form->{path}&action=edit&level=Programm--Finanzamteinstellungen&login=$form->{login}&password=$form->{password}">
-         Keine Steuernummer hinterlegt!</a><br>|;
-  }
-  print qq|
-         <br>
-         | . $locale->text('ELSTER Tax Number') . qq|:&nbsp;
-         $form->{elstersteuernummer}
-          <br>
-          <br>
-
-         </fieldset>
-         <br>
-  |;
-  if ($form->{FA_steuerberater_name} ne '') {
-    print qq|
-         <fieldset>
-         <legend>
-            <input checked="checked" title="|
-      . $locale->text('Assume Tax Consultant Data in Tax Computation?')
-      . qq|" name="FA_steuerberater" id=steuerberater class=checkbox type=checkbox value="1">&nbsp;
-            <b>| . $locale->text('Tax Consultant') . qq|</b>
-            </legend>
-            
-            $form->{FA_steuerberater_name}<br>
-            $form->{FA_steuerberater_street}<br>
-            $form->{FA_steuerberater_city}<br>
-            Tel: $form->{FA_steuerberater_tel}<br>
-         </fieldset>
-         <br>
-    |;
-  }
-  print qq|
-         <fieldset>
-         <legend>
-          <b>| . $locale->text('Tax Period') . qq|</b>
-         </legend>
-  |;
-  &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|<select name=year title="| 
+    . $locale->text('Year') . qq|">|;
+  foreach my $key (@all_years) {
+    $select_year .= qq|<option |;
+    $select_year .= qq|selected| if ($key eq $form->{year});
+    $select_year .= qq| >$key</option>|;
   }
-  map { $form->{selectaccountingyear} .= qq|<option>$_\n| }
-    @{ $form->{all_years} };
-  print qq|
-          <select name=year title="| . $locale->text('Year') . qq|">
-  |;
-  my $key = '';
-  foreach $key (@years) {
-    print qq|<option |;
-    print qq|selected| if ($key eq $form->{year});
-    print qq| >$key</option>
-    |;
-  }
-
-  my $voranmeld = $form->{FA_voranmeld};
-  print qq|             </select>|;
-  my $checked = '';
-  $checked = "checked" if ($form->{kz10} eq '1');
-  print qq|
-           <input name="FA_10" id=FA_10 class=checkbox type=checkbox value="1" $checked title = "|
-    . $locale->text(
-      'Amended Advance Turnover Tax Return (Nr. 10)')
-    . qq|">
-            | . $locale->text('Amended Advance Turnover Tax Return') . qq|
-          <br>
-  |;
-
-  if ($voranmeld ne '') {
-    print qq|
-          <br>
-          | . $locale->text($voranmeld) . qq|
-  |;
-    print $locale->text('With Extension Of Time') if ($form->{FA_dauerfrist} eq '1');
-    print qq|
-
-      <br>
-  |;
-  }
-  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|
-         </fieldset>
-
-    </td>|;
-
-  if ($form->{FA_Name} ne '') {
-    print qq|
-    <td width="50%" valign="top">        
-         <fieldset>
-         <legend>
-         <b>| . $locale->text('Tax Office') . qq|</b>
-         </legend>
-          <h3>$form->{FA_Name}</h2>
-    |;
-
-    #if ($form->{FA_Ergaenzung_Name ne ''}){
-    #  print qq|
-    #          $form->{FA_Ergaenzung_Name}&nbsp
-    #          <br>
-    #  |;
-    #}
-    print qq|
-          $form->{FA_Strasse}
-          <br>
-          $form->{FA_PLZ}&nbsp; &nbsp;$form->{FA_Ort}
-          <br>
-          <br>
-          | . $locale->text('Tel') . qq|.:&nbsp;
-          $form->{FA_Telefon}
-          <br> 
-          | . $locale->text('Fax') . qq|.:$nbsp;
-          $form->{FA_Fax}
-          <br>
-          <br>
-          <a href="mailto:$form->{FA_Email}?subject=|
-      . CGI::escape("Steuer Nr: $form->{steuernummer}:")
-      . qq|&amp;body=|
-      . CGI::escape(
-             "Sehr geehrte Damen und Herren,\n\n\nMit freundlichen Grüßen\n\n")
-      . CGI::escape($form->{signature}) . qq|">
-            $form->{FA_Email}
-          </a>
-          <br>
-          <a href="$form->{FA_Internet}">
-            $form->{FA_Internet}
-          </a>
-          <br>
-          <br>
-          | . $locale->text('Openings') . qq|
-          <br>
-          $oeffnungszeiten
-          <br>
-   |;
-
-    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|
-          <br>
-          | . $locale->text('Bank Connection') . qq|
-          <table>
-          <tr>
-          <td>
-          $form->{FA_Bankbezeichnung_1}
-          <br>                  
-          | . $locale->text('Account') . qq|:&nbsp;
-          $form->{FA_Kontonummer_1}
-          <br>
-          | . $locale->text('Bank Code') . qq|:&nbsp;
-          $form->{FA_BLZ_1}
-          </td>
-          <td>
-          $form->{FA_Bankbezeichnung_oertlich}
-          <br>
-          | . $locale->text('Account') . qq|:&nbsp;
-          $form->{FA_Kontonummer_2}
-          <br> 
-          | . $locale->text('Bank Code') . qq|:&nbsp;
-          $form->{FA_BLZ_2}
-          </td>
-          </tr>
-          </table>
-          <br>|;
-    } elsif ($FA_1) {
-      print qq|
-          <br>
-          | . $locale->text('Bank Connection') . qq|
-          <br>
-          <br>
-          $form->{FA_Bankbezeichnung_1}
-          <br>                  
-          | . $locale->text('Account') . qq|:&nbsp;
-          $form->{FA_Kontonummer_1}
-          <br> 
-          | . $locale->text('Bank Code') . qq|:&nbsp;
-          $form->{FA_BLZ_1}          <br>
-          <br>|;
-    } elsif ($FA_2) {
-      print qq|
-          <br>
-          | . $locale->text('Bank Connection') . qq|
-          <br>
-          <br>
-          $form->{FA_Bankbezeichnung_oertlich}
-          <br>                  
-          | . $locale->text('Account') . qq|:&nbsp;
-          $form->{FA_Kontonummer_2}
-          <br> 
-          | . $locale->text('Bank Code') . qq|:&nbsp;
-          $form->{FA_BLZ_2}
-     |;
+  $select_year   .=  qq|</select>|;
+
+  my $_checked = '';
+  $_checked = "checked" if ($form->{kz10} eq '1');
+  my $checkbox_kz_10 = qq|<input name="FA_10" id=FA_10 class=checkbox|
+    . qq| type=checkbox value="1" $_checked title = "|
+    . $locale->text('Amended Advance Turnover Tax Return (Nr. 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|
-
-      </fieldset>
-      <br>
-      <fieldset>
-      <legend>
-      <b>| . $locale->text('Outputformat') . qq|</b>
-      </legend>
-  |;
-
-    &show_options;
-    my $ausgabe = '1';
-    print qq|
-         </fieldset>
-      |;
-
-  } else {
-    print qq|
-     <td width="50%" valign="bottom">
-     <fieldset>
-     <legend>
-     <b>| . $locale->text('Hints') . qq|</b>
-     </legend>
-      <h2 class="confirm">|
-      . $locale->text('Missing Preferences: Outputroutine disabled')
-      . qq|</h2>
-      <h3>| . $locale->text('Help') . qq|</h3>
-      <ul>
-      <li>| . $locale->text('Hint-Missing-Preferences') . qq|</li>
-      </ul>
-      </fieldset>
-     |;
-    my $ausgabe = '';
-    $hide = q|disabled="disabled"|;
-  }
-
-  print qq|
-      </td>
-    </tr>
-  |;
+  ];
+  
+  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|
-      </table>
-     </td>
-    </tr>
-    <tr>
-     <td><hr size="3" noshade></td>
-    </tr>
-  </table>
-
-  <br>
-  <input type="hidden" name="address" value="$form->{address}">
-  <input type="hidden" name="reporttype" value="custom">
-  <input type="hidden" name="co_street" value="$form->{co_street}">
-  <input type="hidden" name="co_city" value="$form->{co_city}">
-  <input type="hidden" name="path" value="$form->{path}">
-  <input type="hidden" name="login" value="$form->{login}">
-  <input type="hidden" name="password" value="$form->{password}">
-  <table width="100%">
-  <tr>
-   <td align="left">
-     <input type=hidden name=nextsub value=generate_ustva>
-     <input $hide type=submit class=submit name=action value="|
-    . $locale->text('Show') . qq|">
-   </td>
-   <td align="right">
-
-    </form>
-    <!--
-    <form action="doc/ustva.html" method="get">
-    
-       <input type=submit class=submit name=action value="|
-    . $locale->text('Help') . qq|">
-   </form>-->
-   </td>
-  </tr>
-  </table>
-  |;
 
-  print qq|
 
-  </body>
-  </html>
-  |;
   $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|
      <input type=hidden name=day value=$form->{day}>
      <input type=hidden name=month value=$form->{month}>
      <input type=hidden name=yymmdd value=$yymmdd>
      <input type=hidden name=sel value=$sel>
- |;
 |;
 
   if ($form->{FA_voranmeld} eq 'month') {
 
@@ -623,18 +360,18 @@ sub ustva_vorauswahl {
       };
 
     }
-    print qq|<select id="zeitraum" name="period" title="|
+    $select_vorauswahl .= qq|<select id="zeitraum" name="period" title="|
   . $locale->text('Select a period') . qq|" >|;
 
     my $key = '';
     foreach $key (sort keys %liste) {
       my $selected = '';
       $selected = 'selected' if ($sel eq $key);
-      print qq|
+      $select_vorauswahl .= qq|
          <option value="$key" $selected> $liste{$key}</option>
-   |;
+      |;
     }
-    print qq|</select>|;
+    $select_vorauswahl .= qq|</select>|;
 
   } elsif ($form->{FA_voranmeld} eq 'quarter') {
 
@@ -674,23 +411,23 @@ sub ustva_vorauswahl {
       };
     }
 
-    print qq|<select id="zeitraum" name="period" title="|
+    $select_vorauswahl .= qq|<select id="zeitraum" name="period" title="|
       . $locale->text('Select a period') . qq|" >|;
     my $key = '';
     foreach $key (sort keys %liste) {
       my $selected = '';
       $selected = 'selected' if ($sel eq $key);
-      print qq|
+      $select_vorauswahl .= qq|
          <option value="$key" $selected>$liste{$key}</option>
      |;
     }
-    print qq|\n</select>
+    $select_vorauswahl .= qq|\n</select>
    |;
 
   } else {
 
     # keine Vorauswahl bei Voranmeldungszeitraum
-    print qq|<select id="zeitraum" name="period" title="|
+    $select_vorauswahl .= qq|<select id="zeitraum" name="period" title="|
       . $locale->text('Select a period') . qq|" >|;
 
     my %listea = ('41' => '1. Quarter',
@@ -713,28 +450,30 @@ sub ustva_vorauswahl {
                   '13' => 'Yearly',);
     my $key = '';
     foreach $key (sort keys %listea) {
-      print qq|
+      $select_vorauswahl .= qq|
          <option value="$key">|
         . $locale->text("$listea{$key}")
         . qq|</option>\n|;
     }
 
     foreach $key (sort keys %listeb) {
-      print qq|
+      $select_vorauswahl .= qq|
          <option value="$key">|
         . $locale->text("$listeb{$key}")
         . qq|</option>\n|;
     }
-    print qq|</select>|;
+    $select_vorauswahl .= qq|</select>|;
   }
   $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|<option value=elster>|.$locale->text('ELSTER Export nach Winston').qq|</option>|;
-  print qq|
+  my $show_options = qq|
     $type
     $media
     <select name=format title = "|
     . $locale->text('Choose Outputformat') . qq|">$format</select>
   |;
   $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|
-    <body>
-    <form name="verzeichnis" method=post action="$form->{script}">
-     <table width=100%>
-       <tr>
-         <th class="listtop">|
-    . $locale->text('Tax Office Preferences') . qq|</th>
-       </tr>
-        <tr>
-         <td>
-           <br>
-           <fieldset>
-           <legend><b>|
-    . $locale->text('Local Tax Office Preferences') . qq|</b></legend>
-  |;
 
-  #print qq|$form->{terminal}|;
 
-  USTVA::fa_auswahl($land, $amt, &elster_hash());
-  print qq|
-           </fieldset>
-           <br>
-  |;
-  my $checked = '';
-  $checked = "checked" if ($form->{method} eq 'accrual');
-  print qq|
-           <fieldset>
-           <legend><b>| . $locale->text('Taxation') . qq|</b>
-           </legend>
-           <input name=method id=accrual class=radio type=radio value="accrual" $checked>
-           <label for="accrual">| . $locale->text('accrual') . qq|</label>
-           <br>
-  |;
-  $checked = '';
-  $checked = "checked" if ($form->{method} eq 'cash');
-  print qq|
-           <input name=method id=cash class=radio type=radio value="cash" $checked>
-           <label for="cash">| . $locale->text('cash') . qq|</label>
-           </fieldset>
-           <br>
-           <fieldset>
-           <legend><b>| . $locale->text('Tax Period') . qq|</b>
-           </legend>
-  |;
-  $checked = '';
-  $checked = "checked" if ($form->{FA_voranmeld} eq 'month');
-  print qq|
-           <input name=FA_voranmeld id=month class=radio type=radio value="month" $checked>
-           <label for="month">| . $locale->text('month') . qq|</label>
-           <br>
-  |;
-  $checked = '';
-  $checked = "checked" if ($form->{FA_voranmeld} eq 'quarter');
-  print qq|
-           <input name="FA_voranmeld" id=quarter class=radio type=radio value="quarter" $checked>
-           <label for="quarter">| . $locale->text('quarter') . qq|</label>
-           <br>
-  |;
-  $checked = '';
-  $checked = "checked" if ($form->{FA_dauerfrist} eq '1');
-  print qq|
-           <input name="FA_dauerfrist" id=FA_dauerfrist class=checkbox type=checkbox value="1" $checked>
-           <label for="">|
-    . $locale->text('Extension Of Time') . qq|</label>
-           
-           </fieldset>
-           <br>
-           <fieldset>
-           <legend><b>| . $locale->text('Tax Consultant') . qq|</b>
-           </legend>
-  |;
-  $checked = '';
-  $checked = "checked" if ($form->{FA_71} eq 'X');
-  print qq|
-          <!-- <input name="FA_71" id=FA_71 class=checkbox type=checkbox value="X" $checked>
-           <label for="FA_71">|
-    . $locale->text('Clearing Tax Received (No 71)')
-    . qq|</label>
-           <br>
-           <br>-->
-           <table>
-           <tr>
-           <td>
-           | . $locale->text('Name') . qq|
-           </td>
-           <td>
-           | . $locale->text('Street') . qq|
-           </td>
-           <td>
-           | . $locale->text('Zip, City') . qq|
-           </td>
-           <td>
-           | . $locale->text('Telephone') . qq|
-           </td>
-           </tr>
-           <tr>
-           <td>
-           <input name="FA_steuerberater_name" id=steuerberater size=25 value="$form->{FA_steuerberater_name}">
-           </td>
-           <td>
-           <input name="FA_steuerberater_street" id=steuerberater size=25 value="$form->{FA_steuerberater_street}">
-           </td>
-           <td>
-           <input name="FA_steuerberater_city" id=steuerberater size=25 value="$form->{FA_steuerberater_city}">
-           </td>
-           <td>
-           <input name="FA_steuerberater_tel" id=steuerberater size=25 value="$form->{FA_steuerberater_tel}">
-           </tr>
-           </table>
-           
-           </fieldset>
-
-           <br>
-           <br>
-           <hr>
-           <!--<input type=submit class=submit name=action value="|
-    . $locale->text('debug') . qq|">-->
-           |;
-  print qq|
-           <input type="button" name="Verweis" value="|
-    . $locale->text('User Config') . qq|" 
-            onClick="self.location.href='$callback'">| if ($callback ne '');
-  print qq|
-           &nbsp; &nbsp;
-           <input type=submit class=submit name=action value="|
-    . $locale->text('continue') . qq|">
-
-         </td>
-       </tr>
-     </table>
-  |;
+  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|  
-          <input name=$variable type=hidden value="$form->{$variable}">|;
-  }
-  my $steuernummer_new = '';
+  my $_hidden_variables_ref;
 
-  #<input type=hidden name="steuernummer_new" value="$form->{$steuernummer_new}">
-  print qq|
-          <input type=hidden name="callback" value="$callback">
-          <input type=hidden name="nextsub" value="edit_form">
-          <input type=hidden name="warnung" value="1">
-          <input type=hidden name="saved" value="|
-    . $locale->text('Check Details') . qq|">
-          <input type=hidden name="path" value=$form->{path}>
-          <input type=hidden name="login" value=$form->{login}>
-          <input type=hidden name="password" value=$form->{password}>
-          <input type=hidden name="warnung" value="0">
-  |;
+  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|  
-          <input name=$variable type=hidden value="$form->{$variable}">|;
+  foreach my $variable (@_hidden_form_variables) {
+    push @{ $_hidden_variables_ref}, 
+        { 'variable' => $variable, 'value' => $form->{$variable} };
   }
 
-  print qq|
-   </form>
-   </body>
-|;
+  # 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|
-    <body>
-  |;
+
+#  print qq|
+#    <body>
+#  |;
+
   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|
-   <form name="elsterform" method=post action="$form->{script}">
-   <table width="100%">
-       <tr>
-        <th colspan="2" class="listtop">|
-    . $locale->text('Tax Office Preferences') . qq|</th>
-       </tr>
-       <tr>
-         <td colspan=2>
-         <br>
-  |;
-  &show_fa_daten;
-  print qq|
-         </td>
-       </tr>
-       <tr>
-         <td colspan="2">
-           <br>
-           <fieldset>
-           <legend>
-           <font size="+1">| . $locale->text('Tax Number') . qq|</font>
-           </legend>
-           <br>
-  |;
-  $steuernummer =
-    USTVA::steuernummer_input($form->{elsterland}, $form->{elsterFFFF},
-                              $form->{steuernummer});
-  print qq|
-           </H2><br>
-           </fieldset>
-           <br>
-           <br>
-           <hr>
-         </td>
-      </tr>
-      <tr>
-         <td align="left">
-
-          <input type=hidden name=lastsub value="edit">
-          |;
-  print qq|<input type=submit class=submit name=action value="|
-    . $locale->text('back') . qq|">|
-    if ($form->{callback} eq '');
-
-  print qq|
-           <input type="button" name="Verweis" value="|
-    . $locale->text('User Config') . qq|" 
-            onClick="self.location.href='$form->{callback}'">|
-    if ($form->{callback} ne '');
-
-  if ($form->{warnung} eq "1") {
-    print qq|
-          <input type=hidden name=nextsub value="edit_form">
-          <input type=submit class=submit name=action value="|
-      . $locale->text('continue') . qq|">
-          <input type=hidden name="saved" value="|
-      . $locale->text('Check Details') . qq|">
-    |;
-  } else {
-    print qq|
-          <input type=hidden name="nextsub" value="save">
-          <input type=hidden name="filename" value="finanzamt.ini">
-          <input type=submit class=submit name=action value="|
-      . $locale->text('save') . qq|">
-         |;
-  }
+  my $steuernummer = $form->{steuernummer} if ($steuernummer eq '');
 
-  print qq|
-         </td>
-         <td align="right">
-           <H2 class=confirm>$form->{saved}</H2>
-         </td>
-      </tr>
-  </table>
-  |;
+  $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|
-        <input name="$variable" type="hidden" value="$form->{$variable}">|;
+  
+  foreach my $variable (keys %_hidden_local_variables) {
+    push @{ $_hidden_variables_ref }, 
+        { 'variable' => $variable, 'value' => $_hidden_local_variables{$variable} };
   }
-  print qq|
-          <input type=hidden name="elsterland" value="$elsterland">
-          <input type=hidden name="elsterFFFF" value="$elsterFFFF">
-          <input type=hidden name="warnung" value="$warnung">
-          <input type=hidden name="elstersteuernummer" value="$elstersteuernummer">
-          <input type=hidden name="steuernummer" value="$stnr">
-          <input type=hidden name="callback" value="$form->{callback}">
-  </form>
-  |;
+  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/<br>/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|    <br>
-               <fieldset>
-               <legend>
-               <font size="+1">|
-    . $locale->text('Tax Office') . qq| $form->{FA_Name}</font>
-               </legend>
-  |;
-
-  #print qq|\n<h4>$form->{FA_Ergaenzung_Name}&nbsp;</h4>
-  #        | if ( $form->{FA_Ergaenzung_Name} );
-  print qq|
-               <table width="100%" valign="top">
-               <tr>
-                <td valign="top">
-                  <br>
-                  <fieldset>
-                    <legend>
-                    <b>| . $locale->text('Address') . qq|</b>
-                    </legend>
-
-                  <table width="100%">
-                   <tr>
-                    <td>
-                    | . $locale->text('Tax Office') . qq|
-                    </td>
-                   </tr>
-                   <tr>
-                    <td colspan="2">
-                     <input name="FA_Name" size="40" title="FA_Name" value="$form->{FA_Name}" $readonly>
-                    <td>
-                   </tr>
-                   <tr>
-                    <td colspan="2">
-                     <input name="FA_Strasse" size="40" title="FA_Strasse" value="$form->{FA_Strasse}" $readonly>
-                    </td width="100%">
-                   </tr>
-                   <tr>
-                    <td width="116px">
-                     <input name="FA_PLZ" size="10" title="FA_PLZ" value="$form->{FA_PLZ}" $readonly>
-                    </td>
-                    <td>
-                     <input name="FA_Ort" size="20" title="FA_Ort" value="$form->{FA_Ort}" $readonly>
-                    </td>
-                  </tr>
-                  </table>
-                  </fieldset>
-                  <br>
-                  <fieldset>
-                  <legend>
-                  <b>| . $locale->text('Contact') . qq|</b>
-                  </legend>
-                      | . $locale->text('Telephone') . qq|<br>
-                      <input name="FA_Telefon" size="40" title="FA_Telefon" value="$form->{FA_Telefon}" $readonly>
-                      <br>
-                      <br> 
-                      | . $locale->text('Fax') . qq|<br>
-                      <input name="FA_Fax" size="40" title="FA_Fax" value="$form->{FA_Fax}" $readonly>
-                      <br>
-                      <br>
-                      | . $locale->text('Internet') . qq|<br>
-                      <input name="FA_Email" size="40" title="FA_Email" value="$form->{FA_Email}" $readonly>
-                      <br>
-                      <br>
-                      <input name="FA_Internet" size="40" title="" title="FA_Internet" value="$form->{FA_Internet}" $readonly>
-                      <br>
-                  </fieldset>
-                </td>
-                <td valign="top">
-                  <br>
-                  <fieldset>
-                  <legend>
-                  <b>| . $locale->text('Openings') . qq|</b>
-                  </legend>
-                  <textarea name="FA_Oeffnungszeiten" rows="4" cols="40" $readonly>$oeffnungszeiten</textarea>
-                  </fieldset>
-                  <br>
-  |;
-  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|
-                    <fieldset>
-                    <legend>
-                    <b>|
-      . $locale->text('Bank Connection Tax Office') . qq|</b>
-                    <legend>
-                    <table>   
-                    <tr>
-                     <td>
-                        | . $locale->text('Bank') . qq|
-                        <br>
-                        <input name="FA_Bankbezeichnung_1" size="30" value="$form->{FA_Bankbezeichnung_1}" $readonly>
-                        <br>
-                        <br>
-                        | . $locale->text('Account Nummer') . qq|
-                        <br>
-                        <input name="FA_Kontonummer_1" size="15" value="$form->{FA_Kontonummer_1}" $readonly>
-                        <br>
-                        <br> 
-                        | . $locale->text('Bank Code (long)') . qq|
-                        <br>
-                        <input name="FA_BLZ_1" size="15" value="$form->{FA_BLZ_1}" $readonly>
-                     </td>
-                     <td>
-                        | . $locale->text('Bank') . qq|
-                        <br>
-                        <input name="FA_Bankbezeichnung_oertlich" size="30" value="$form->{FA_Bankbezeichnung_oertlich}" $readonly>
-                        <br>
-                        <br>
-                        | . $locale->text('Account Nummer') . qq|
-                        <br>
-                        <input name="FA_Kontonummer_2" size="15" value="$form->{FA_Kontonummer_2}" $readonly>
-                        <br>
-                        <br> 
-                        | . $locale->text('Bank Code (long)') . qq|
-                        <br>
-                        <input name="FA_BLZ_2" size="15" value="$form->{FA_BLZ_2}" $readonly>
-                     </td>
-                    </tr>
-                    </table>
-                    </fieldset>
-    |;
-  } elsif ($FA_1) {
-    print qq|
-                    <fieldset>
-                    <legend>
-                      <b>|
-      . $locale->text('Bank Connection Tax Office') . qq|</b>
-                    <legend>
-                    | . $locale->text('Account Nummer') . qq|
-                    <br>
-                    <input name="FA_Kontonummer_1" size="30" value="$form->{FA_Kontonummer_1}" $readonly>
-                    <br>
-                    <br> 
-                    | . $locale->text('Bank Code (long)') . qq|
-                    <br>
-                    <input name="FA_BLZ_1" size="15" value="$form->{FA_BLZ_1}" $readonly>
-                    <br>
-                    <br>
-                    | . $locale->text('Bank') . qq|
-                    <br>
-                    <input name="FA_Bankbezeichnung_1" size="15" value="$form->{FA_Bankbezeichnung_1}" $readonly>
-                    <br>
-                    </fieldset>
-    |;
-  } else {
-    print qq|
-                    <fieldset>
-                    <legend>
-                      <b>|
-      . $locale->text('Bank Connection Tax Office') . qq|</b>
-                    <legend> 
-                    | . $locale->text('Account Nummer') . qq|
-                    <br>
-                    <input name="FA_Kontonummer_2" size="30" value="$form->{FA_Kontonummer_2}" $readonly>
-                    <br>
-                    <br> 
-                    | . $locale->text('Bank Code (long)') . qq|
-                    <br>
-                    <input name="FA_BLZ_2" size="15" value="$form->{FA_BLZ_2}" $readonly>
-                    <br>
-                    <br>
-                    | . $locale->text('Bank') . qq|
-                    <br>
-                    <input name="FA_Bankbezeichnung_oertlich" size="15" value="$form->{FA_Bankbezeichnung_oertlich}" $readonly>
-                    </fieldset>
-    |;
-  }
-  print qq|
-                 </td>
-               </tr>              
-          </table>
-  </fieldset>
-  |;
+  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;
 }
index 0f20e4f..cf00aee 100644 (file)
@@ -1,6 +1,10 @@
 ####################################\r
 # Veraenderungen von Lx-Office ERP #\r
 ####################################\r
+\r
+  - USTVA Screens in HTML-Templates verlagert\r
+  - USTVA Taxbird kleinere Anpassungen zur Kompatibilität\r
+\r
 2007-01-19 - Version 2.4.1\r
   - CSV-Import auf Verwendung von Buchungsgruppen angepasst\r
   - Bei Einkaufs- und Verkaufsmasken lassen sich die zweiten Positionszeilen\r
diff --git a/templates/webpages/ustva/config_step1_de.html b/templates/webpages/ustva/config_step1_de.html
new file mode 100644 (file)
index 0000000..8ba180c
--- /dev/null
@@ -0,0 +1,113 @@
+<!--This file is autogenerated,
+ Edit templates/webpages/ustva/config_step1_master.html
+ and run locale/<cc>/locales.pl -->
+  
+<body>
+<form name="verzeichnis" method="post" action="<TMPL_VAR script ESCAPE=HTML>">
+<table width=100%>
+   <tr>
+      <th class="listtop">Finanzamt - Einstellungen</th>
+    </tr>
+    <tr>
+     <td>
+       <br />
+       <fieldset>
+       <legend><b>Angaben zum Finanzamt</b></legend>
+       <br />
+       <TMPL_VAR select_tax_office>
+       </fieldset>
+       <br />
+       
+       <fieldset>
+       <legend><b>Versteuerungs Verfahren</b>
+       </legend>
+       <input name="method" id="accrual" class="radio" type="radio" value="accrual"
+         <TMPL_VAR checked_accrual>>
+       <label for="accrual">Bilanzierung (Soll-Versteuerung)</label>
+       <br>
+       <input name="method" id="cash" class="radio" type="radio" value="cash"
+         <TMPL_VAR checked_cash>>
+       <label for="cash">E/Ü-Rechnung (Ist-Versteuerung)</label>
+       </fieldset>
+       <br>
+       <fieldset>
+       <legend><b>Voranmeldungszeitraum</b>
+       </legend>
+
+
+           <input name=FA_voranmeld id=month class=radio type=radio value="month"
+             <TMPL_VAR checked_monthly>>
+           <label for="month">monatliche Abgabe</label>
+           <br>
+           <input name="FA_voranmeld" id=quarter class=radio type=radio value="quarter"
+             <TMPL_VAR checked_quarterly>>
+           <label for="quarter">vierteljährliche (quartalsweise) Abgabe</label>
+           <br>
+           <input name="FA_dauerfrist" id=FA_dauerfrist class=checkbox type=checkbox value="1"
+             <TMPL_VAR checked_dauerfristverlaengerung>>
+           <label for="">Dauerfristverlängerung</label>
+           
+           </fieldset>
+           <br>
+           <fieldset>
+           <legend><b>Steuerberater/-in</b>
+           </legend>
+          <!-- <input name="FA_71" id=FA_71 class=checkbox type=checkbox value="X"
+             <TMPL_VAR checked_kz_71>>
+           <label for="FA_71">Verrechnung des Erstattungsbetrages erwünscht (Zeile 71)
+    .      </label>
+           <br>
+           <br>-->
+           <table>
+           <tr>
+           <td>
+           Name
+           </td>
+           <td>
+           Straße
+           </td>
+           <td>
+           PLZ, Ort
+           </td>
+           <td>
+           Telefon
+           </td>
+           </tr>
+           <tr>
+           <td>
+           <input name="FA_steuerberater_name" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_name ESCAPE=HTML>">
+           </td>
+           <td>
+           <input name="FA_steuerberater_street" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_street ESCAPE=HTML>">
+           </td>
+           <td>
+           <input name="FA_steuerberater_city" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_city ESCAPE=HTML>">
+           </td>
+           <td>
+           <input name="FA_steuerberater_tel" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_tel ESCAPE=HTML>">
+           </tr>
+           </table>
+           
+           </fieldset>
+
+           <br>
+           <br>
+           <hr>
+           <!--<input type=submit class=submit name=action value="
+           Debug">-->
+           <input type=submit class=submit name=action 
+             value="weiter">
+         </td>
+       </tr>
+     </table>
+
+     <TMPL_LOOP hidden_variables>
+       <input type="hidden" name="<TMPL_VAR variable ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
+     </TMPL_LOOP>
+  </form>
+</body>
+           
diff --git a/templates/webpages/ustva/config_step1_master.html b/templates/webpages/ustva/config_step1_master.html
new file mode 100644 (file)
index 0000000..ab985b4
--- /dev/null
@@ -0,0 +1,113 @@
+<!--This file is autogenerated,
+ Edit templates/webpages/ustva/config_step1_master.html
+ and run locale/<cc>/locales.pl -->
+  
+<body>
+<form name="verzeichnis" method="post" action="<TMPL_VAR script ESCAPE=HTML>">
+<table width=100%>
+   <tr>
+      <th class="listtop"><translate>Tax Office Preferences</translate></th>
+    </tr>
+    <tr>
+     <td>
+       <br />
+       <fieldset>
+       <legend><b><translate>Local Tax Office Preferences</translate></b></legend>
+       <br />
+       <TMPL_VAR select_tax_office>
+       </fieldset>
+       <br />
+       
+       <fieldset>
+       <legend><b><translate>Taxation</translate></b>
+       </legend>
+       <input name="method" id="accrual" class="radio" type="radio" value="accrual"
+         <TMPL_VAR checked_accrual>>
+       <label for="accrual"><translate>accrual</translate></label>
+       <br>
+       <input name="method" id="cash" class="radio" type="radio" value="cash"
+         <TMPL_VAR checked_cash>>
+       <label for="cash"><translate>cash</translate></label>
+       </fieldset>
+       <br>
+       <fieldset>
+       <legend><b><translate>Tax Period</translate></b>
+       </legend>
+
+
+           <input name=FA_voranmeld id=month class=radio type=radio value="month"
+             <TMPL_VAR checked_monthly>>
+           <label for="month"><translate>month</translate></label>
+           <br>
+           <input name="FA_voranmeld" id=quarter class=radio type=radio value="quarter"
+             <TMPL_VAR checked_quarterly>>
+           <label for="quarter"><translate>quarter</translate></label>
+           <br>
+           <input name="FA_dauerfrist" id=FA_dauerfrist class=checkbox type=checkbox value="1"
+             <TMPL_VAR checked_dauerfristverlaengerung>>
+           <label for=""><translate>Extension Of Time</translate></label>
+           
+           </fieldset>
+           <br>
+           <fieldset>
+           <legend><b><translate>Tax Consultant</translate></b>
+           </legend>
+          <!-- <input name="FA_71" id=FA_71 class=checkbox type=checkbox value="X"
+             <TMPL_VAR checked_kz_71>>
+           <label for="FA_71"><translate>Clearing Tax Received (No 71)</translate>
+    .      </label>
+           <br>
+           <br>-->
+           <table>
+           <tr>
+           <td>
+           <translate>Name</translate>
+           </td>
+           <td>
+           <translate>Street</translate>
+           </td>
+           <td>
+           <translate>Zip, City</translate>
+           </td>
+           <td>
+           <translate>Telephone</translate>
+           </td>
+           </tr>
+           <tr>
+           <td>
+           <input name="FA_steuerberater_name" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_name ESCAPE=HTML>">
+           </td>
+           <td>
+           <input name="FA_steuerberater_street" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_street ESCAPE=HTML>">
+           </td>
+           <td>
+           <input name="FA_steuerberater_city" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_city ESCAPE=HTML>">
+           </td>
+           <td>
+           <input name="FA_steuerberater_tel" id=steuerberater size=25
+             value="<TMPL_VAR FA_steuerberater_tel ESCAPE=HTML>">
+           </tr>
+           </table>
+           
+           </fieldset>
+
+           <br>
+           <br>
+           <hr>
+           <!--<input type=submit class=submit name=action value="
+           <translate>debug</translate>">-->
+           <input type=submit class=submit name=action 
+             value="<translate>continue</translate>">
+         </td>
+       </tr>
+     </table>
+
+     <TMPL_LOOP hidden_variables>
+       <input type="hidden" name="<TMPL_VAR variable ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>">
+     </TMPL_LOOP>
+  </form>
+</body>
+           
\ 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 (file)
index 0000000..b96318b
--- /dev/null
@@ -0,0 +1,203 @@
+<!--This file is autogenerated, 
+ Edit templates/webpages/ustva/config_step2_master.html
+ and run locale/<cc>/locales.pl -->
+
+
+<body>
+  <form name="elsterform" method="post" action="<TMPL_VAR script>">
+    <table width="100%">
+       <tr>
+         <th colspan="2" class="listtop">
+           Finanzamt - Einstellungen</th>
+       </tr>
+       <tr>
+         <td colspan=2>
+           <br>
+           <!-- Start Finanzamtdaten --> 
+           <br>
+           <fieldset>
+             <legend>
+               <font size="+1">Finanzamt 
+               <TMPL_VAR FA_Name ESCAPE=HTML></font>
+             </legend>
+             <table width="100%" valign="top">
+                <tr>
+                  <td valign="top">
+                    <br>
+                    <fieldset>
+                      <legend>
+                      <b>Adresse</b>
+                      </legend>
+                      <table width="100%">
+                        <tr>
+                          <td>
+                            Finanzamt
+                          </td>
+                        </tr>
+                        <tr>
+                          <td colspan="2">
+                            <input name="FA_Name" size="40" title="FA_Name"
+                              value="<TMPL_VAR FA_Name ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <td>
+                        </tr>
+                        <tr>
+                          <td colspan="2">
+                            <input name="FA_Strasse" size="40" title="FA_Strasse"
+                              value="<TMPL_VAR FA_Strasse ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          </td width="100%">
+                        </tr>
+                        <tr>
+                          <td width="116px">
+                            <input name="FA_PLZ" size="10" title="FA_PLZ"
+                              value="<TMPL_VAR FA_PLZ ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          </td>
+                          <td>
+                            <input name="FA_Ort" size="20" title="FA_Ort"
+                              value="<TMPL_VAR FA_Ort ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          </td>
+                        </tr>
+                      </table>
+                    </fieldset>
+                    <br>
+                    <fieldset>
+                      <legend>
+                        <b>Kontakt</b>
+                      </legend>
+                        Telefon<br>
+                        <input name="FA_Telefon" size="40" title="FA_Telefon"
+                          value="<TMPL_VAR FA_Telefon ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                        <br> 
+                        Fax<br>
+                        <input name="FA_Fax" size="40" title="FA_Fax"
+                          value="<TMPL_VAR FA_Fax ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                        <br>
+                        Internet<br>
+                        <input name="FA_Email" size="40" title="FA_Email"
+                          value="<TMPL_VAR FA_Email ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                        <br>
+                        <input name="FA_Internet" size="40" title="" title="FA_Internet"
+                          value="<TMPL_VAR FA_Internet ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                    </fieldset>
+                  </td>
+                  <td valign="top">
+                    <br>
+                    <fieldset>
+                    <legend>
+                    <b>Öffnungszeiten</b>
+                    </legend>
+                    <textarea name="FA_Oeffnungszeiten" rows="4" cols="40" 
+                      <TMPL_VAR readonly>><TMPL_VAR FA_Oeffnungszeiten ESCAPE=HTML></textarea>
+                    </fieldset>
+                    <br>
+                      <fieldset>
+                      <legend>
+                        <b>Bankverbindung des Finanzamts</b>
+                      <legend>
+                      <table>   
+                      <tr>
+                        <td width="40%">
+                          Bank
+                          <br>
+                          <input name="FA_Bankbezeichnung_1" size="30" 
+                            value="<TMPL_VAR FA_Bankbezeichnung_1 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br>
+                          Kontonummer
+                          <br>
+                          <input name="FA_Kontonummer_1" size="15" 
+                            value="<TMPL_VAR FA_Kontonummer_1 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br> 
+                          Bankleitzahl (BLZ)
+                          <br>
+                          <input name="FA_BLZ_1" size="15" 
+                            value="<TMPL_VAR FA_BLZ_1 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        </td>
+                        <td width="40%">
+                          Bank
+                          <br>
+                          <input name="FA_Bankbezeichnung_oertlich" size="30"
+                            value="<TMPL_VAR FA_Bankbezeichnung_oertlich ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br>
+                          Kontonummer
+                          <br>
+                          <input name="FA_Kontonummer_2" size="15"
+                            value="<TMPL_VAR FA_Kontonummer_2 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br> 
+                          Bankleitzahl (BLZ)
+                          <br>
+                          <input name="FA_BLZ_2" size="15"
+                            value="<TMPL_VAR FA_BLZ_2 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        </td>
+                   </tr>
+             </table>
+           </fieldset>
+         </td>
+       </tr>              
+    </table>
+  </fieldset>
+
+<!-- Stop Finanzamtdaten  --> 
+
+        </td>
+       </tr>
+       <tr>
+         <td colspan="2">
+           <br>
+           <fieldset>
+           <legend>
+           <font size="+1">Steuernummer</font>
+           </legend>
+           <br>
+           <TMPL_VAR input_steuernummer>
+           </H2><br>
+           </fieldset>
+           <br>
+           <br>
+           <hr>
+         </td>
+       </tr>
+       <tr>
+         <td align="left">
+
+          <TMPL_IF callback>
+           <input type="button" name="Verweis" value="Benutzereinstellungen" 
+            onClick="self.location.href='<TMPL_VAR callback>">
+          <TMPL_ELSE>
+            <input type="submit" class="submit" name="action" value="zurück">
+          </TMPL_IF>
+
+          <TMPL_IF warnung>
+          
+            <input type="hidden" name="nextsub" value="config_step2">
+            <input type="submit" class="submit" name="action"
+              value="weiter">
+             
+            <input type="hidden" name="saved" value="Bitte Angaben überprüfen">
+
+          <TMPL_ELSE>
+
+            <input type="hidden" name="nextsub" value="save">
+            <input type="hidden" name="filename" value="finanzamt.ini">
+            <input type="submit" class="submit" name="action" value="Speichern">
+
+          </TMPL_IF>
+
+         </td>
+         <td align="right">
+           <H2 class="confirm"><TMPL_VAR saved></H2>
+         </td>
+      </tr>
+  </table>
+
+ <TMPL_INCLUDE "../generic/util_hidden_variables_de.html">     
+
+  </form>
+</body>
+</html>
diff --git a/templates/webpages/ustva/config_step2_master.html b/templates/webpages/ustva/config_step2_master.html
new file mode 100644 (file)
index 0000000..12dd83b
--- /dev/null
@@ -0,0 +1,204 @@
+<!--This file is autogenerated, 
+ Edit templates/webpages/ustva/config_step2_master.html
+ and run locale/<cc>/locales.pl -->
+
+
+<body>
+  <form name="elsterform" method="post" action="<TMPL_VAR script>">
+    <table width="100%">
+       <tr>
+         <th colspan="2" class="listtop">
+           <translate>Tax Office Preferences</translate></th>
+       </tr>
+       <tr>
+         <td colspan=2>
+           <br>
+           <!-- Start Finanzamtdaten --> 
+           <br>
+           <fieldset>
+             <legend>
+               <font size="+1"><translate>Tax Office</translate> 
+               <TMPL_VAR FA_Name ESCAPE=HTML></font>
+             </legend>
+             <table width="100%" valign="top">
+                <tr>
+                  <td valign="top">
+                    <br>
+                    <fieldset>
+                      <legend>
+                      <b><translate>Address</translate></b>
+                      </legend>
+                      <table width="100%">
+                        <tr>
+                          <td>
+                            <translate>Tax Office</translate>
+                          </td>
+                        </tr>
+                        <tr>
+                          <td colspan="2">
+                            <input name="FA_Name" size="40" title="FA_Name"
+                              value="<TMPL_VAR FA_Name ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <td>
+                        </tr>
+                        <tr>
+                          <td colspan="2">
+                            <input name="FA_Strasse" size="40" title="FA_Strasse"
+                              value="<TMPL_VAR FA_Strasse ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          </td width="100%">
+                        </tr>
+                        <tr>
+                          <td width="116px">
+                            <input name="FA_PLZ" size="10" title="FA_PLZ"
+                              value="<TMPL_VAR FA_PLZ ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          </td>
+                          <td>
+                            <input name="FA_Ort" size="20" title="FA_Ort"
+                              value="<TMPL_VAR FA_Ort ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          </td>
+                        </tr>
+                      </table>
+                    </fieldset>
+                    <br>
+                    <fieldset>
+                      <legend>
+                        <b><translate>Contact</translate></b>
+                      </legend>
+                        <translate>Telephone</translate><br>
+                        <input name="FA_Telefon" size="40" title="FA_Telefon"
+                          value="<TMPL_VAR FA_Telefon ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                        <br> 
+                        <translate>Fax</translate><br>
+                        <input name="FA_Fax" size="40" title="FA_Fax"
+                          value="<TMPL_VAR FA_Fax ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                        <br>
+                        <translate>Internet</translate><br>
+                        <input name="FA_Email" size="40" title="FA_Email"
+                          value="<TMPL_VAR FA_Email ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                        <br>
+                        <input name="FA_Internet" size="40" title="" title="FA_Internet"
+                          value="<TMPL_VAR FA_Internet ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        <br>
+                    </fieldset>
+                  </td>
+                  <td valign="top">
+                    <br>
+                    <fieldset>
+                    <legend>
+                    <b><translate>Openings</translate></b>
+                    </legend>
+                    <textarea name="FA_Oeffnungszeiten" rows="4" cols="40" 
+                      <TMPL_VAR readonly>><TMPL_VAR FA_Oeffnungszeiten ESCAPE=HTML></textarea>
+                    </fieldset>
+                    <br>
+                      <fieldset>
+                      <legend>
+                        <b><translate>Bank Connection Tax Office</translate></b>
+                      <legend>
+                      <table>   
+                      <tr>
+                        <td width="40%">
+                          <translate>Bank</translate>
+                          <br>
+                          <input name="FA_Bankbezeichnung_1" size="30" 
+                            value="<TMPL_VAR FA_Bankbezeichnung_1 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br>
+                          <translate>Account Nummer</translate>
+                          <br>
+                          <input name="FA_Kontonummer_1" size="15" 
+                            value="<TMPL_VAR FA_Kontonummer_1 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br> 
+                          <translate>Bank Code (long)</translate>
+                          <br>
+                          <input name="FA_BLZ_1" size="15" 
+                            value="<TMPL_VAR FA_BLZ_1 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        </td>
+                        <td width="40%">
+                          <translate>Bank</translate>
+                          <br>
+                          <input name="FA_Bankbezeichnung_oertlich" size="30"
+                            value="<TMPL_VAR FA_Bankbezeichnung_oertlich ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br>
+                          <translate>Account Nummer</translate>
+                          <br>
+                          <input name="FA_Kontonummer_2" size="15"
+                            value="<TMPL_VAR FA_Kontonummer_2 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                          <br>
+                          <br> 
+                          <translate>Bank Code (long)</translate>
+                          <br>
+                          <input name="FA_BLZ_2" size="15"
+                            value="<TMPL_VAR FA_BLZ_2 ESCAPE=HTML>" <TMPL_VAR readonly>>
+                        </td>
+                   </tr>
+             </table>
+           </fieldset>
+         </td>
+       </tr>              
+    </table>
+  </fieldset>
+
+<!-- Stop Finanzamtdaten  --> 
+
+        </td>
+       </tr>
+       <tr>
+         <td colspan="2">
+           <br>
+           <fieldset>
+           <legend>
+           <font size="+1"><translate>Tax Number</translate></font>
+           </legend>
+           <br>
+           <TMPL_VAR input_steuernummer>
+           </H2><br>
+           </fieldset>
+           <br>
+           <br>
+           <hr>
+         </td>
+       </tr>
+       <tr>
+         <td align="left">
+
+          <TMPL_IF callback>
+           <input type="button" name="Verweis" value="<translate>User Config</translate>" 
+            onClick="self.location.href='<TMPL_VAR callback>">
+          <TMPL_ELSE>
+            <input type="submit" class="submit" name="action" value="<translate>back</translate>">
+          </TMPL_IF>
+
+          <TMPL_IF warnung>
+          
+            <input type="hidden" name="nextsub" value="config_step2">
+            <input type="submit" class="submit" name="action"
+              value="<translate>continue</translate>">
+             
+            <input type="hidden" name="saved" value="<translate>Check
+              Details</translate>">
+
+          <TMPL_ELSE>
+
+            <input type="hidden" name="nextsub" value="save">
+            <input type="hidden" name="filename" value="finanzamt.ini">
+            <input type="submit" class="submit" name="action" value="<translate>Save</translate>">
+
+          </TMPL_IF>
+
+         </td>
+         <td align="right">
+           <H2 class="confirm"><TMPL_VAR saved></H2>
+         </td>
+      </tr>
+  </table>
+
+ <TMPL_INCLUDE "../generic/util_hidden_variables_master.html">     
+
+  </form>
+</body>
+</html>
\ 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 (file)
index 0000000..7497790
--- /dev/null
@@ -0,0 +1,226 @@
+<!--This file is autogenerated,
+ Edit templates/webpages/ustva/report_master.html
+ and run locale/<cc>/locales.pl -->
+  
+ <body>
+ <form method="post" action="<TMPL_VAR script ESCAPE=HTML>">
+
+ <input type="hidden" name="title" value="<TMPL_VAR title ESCAPE=HTML>">
+
+ <table width="100%">
+  <tr>
+    <th class="listtop"><TMPL_VAR title ESCAPE=HTML></th>
+  </tr>
+  <tr height="5"></tr>
+  <tr>
+    <td>
+      <table>
+       <tr>
+         <td width="50%" align="left" valign="top">
+            <fieldset>
+            <legend>
+            <b>Firma</b>
+            </legend>
+            
+            <TMPL_VAR company_given>
+            <TMPL_VAR address_given>
+            
+            <br />
+            <br />
+            Tel.:&nbsp;
+            <TMPL_VAR co_tel ESCAPE=HTML>
+            <br />
+            Fax.:&nbsp;
+            <TMPL_VAR co_fax ESCAPE=HTML>
+            <br />
+            <br />
+            <TMPL_VAR co_email ESCAPE=HTML>
+            <br />
+            <br />
+            Steuernummer:&nbsp;
+            <TMPL_VAR taxnumber_given>
+            <br />
+            ELSTER-Steuernummer:&nbsp;
+            <TMPL_VAR elstersteuernummer ESCAPE=HTML>
+            <br />
+            <br />
+
+            </fieldset>
+            <br />
+            
+            <TMPL_IF FA_steuerberater_name>
+              <fieldset>
+              <legend>
+                <input checked="checked" 
+                 title = "Beraterdaten in UStVA übernehmen?"
+                 name = "FA_steuerberater" 
+                 id = "steuerberater" 
+                 class = "checkbox" 
+                 type = "checkbox"
+                 value = "1" >
+                 &nbsp;<b>Steuerberater/-in</b>
+                </legend>
+                
+                <TMPL_VAR FA_steuerberater_name ESCAPE=HTML><br />
+                <TMPL_VAR FA_steuerberater_street ESCAPE=HTML><br />
+                <TMPL_VAR FA_steuerberater_city ESCAPE=HTML><br />
+                Tel. <TMPL_VAR FA_steuerberater_tel ESCAPE=HTML><br />
+              </fieldset>
+              <br />
+            </TMPL_IF>
+
+            <fieldset>
+            <legend>
+            <b>Voranmeldungszeitraum</b>
+            </legend>
+            <TMPL_VAR select_year> <TMPL_VAR ustva_vorauswahl>
+            <TMPL_VAR checkbox_kz_10>
+            <br />
+            <TMPL_IF FA_voranmeld>
+              <br />
+              <TMPL_VAR period_local>
+              <TMPL_IF FA_dauerfrist>
+                mit Dauerfristverlängerung
+              </TMPL_IF>
+              <br />
+            </TMPL_IF>
+            
+            <TMPL_IF method_local>
+              Verfahren: <TMPL_VAR method_local>
+            </TMPL_IF>
+            </fieldset>
+          </td>
+          <td width="50%" valign="top">          
+
+<!--            TMPL_IF FA_Name                   -->
+
+              <fieldset>
+              <legend>
+                 <b>Finanzamt</b>
+              </legend>
+              <h3><TMPL_VAR FA_Name ESCAPE=HTML></h3>
+            
+              <TMPL_VAR FA_Strasse ESCAPE=HTML>
+              <br>
+              <TMPL_VAR FA_PLZ ESCAPE=HTML>&nbsp; &nbsp;<TMPL_VAR FA_Ort
+                ESCAPE=HTML>
+              <br>
+              <br>
+              Tel.:&nbsp;
+              <TMPL_VAR FA_Telefon ESCAPE=HTML>
+              <br> 
+              Fax.:&nbsp;
+              <TMPL_VAR FA_Fax ESCAPE=HTML>
+              <br>
+              <br>
+              <!-- Mailto alles Maskieren! -->
+              <a href="mailto:<TMPL_VAR FA_Email ESCAPE=HTML>
+                ?subject=&quot;<TMPL_VAR steuernummer ESCAPE=HTML>:&quot;
+                &amp;bcc=&quot;<TMPL_VAR email ESCAPE=HTML>&quot;
+                &amp;body=&quot;Sehr%20geehrte%20Damen%20und%20Herren,
+                %0D%0A%0D%0A%0D%0AMit%20freundlichen%20Gr&uuml;&szlig;en
+                %0D%0A%0D%0A<TMPL_VAR signature ESCAPE=HTML>&quot;">
+              <TMPL_VAR FA_Email ESCAPE=HTML>
+              </a>
+              <br>
+              <a href="<TMPL_VAR FA_Internet>">
+              <TMPL_VAR FA_Internet ESCAPE=HTML>
+              </a>
+              <br>
+              <br>
+              Öffnungszeiten
+              <br>
+              <TMPL_VAR openings ESCAPE=0>
+              <br>
+              <br>
+              Bankverbindungen
+              <table>
+              <tr>
+
+              <TMPL_LOOP NAME="tax_office_banks">
+                  <td width="40%">
+                  <TMPL_VAR Bankbezeichnung ESCAPE=HTML>
+                  <br>                  
+                  Konto:&nbsp;
+                  <TMPL_VAR Kontonummer ESCAPE=HTML>
+                  <br>
+                  BLZ:&nbsp;
+                  <TMPL_VAR BLZ ESCAPE=HTML>
+                  </td>
+              </TMPL_LOOP>
+
+              </tr>
+              </table>
+              <br>
+              </fieldset>
+              
+              <br> 
+              
+              <fieldset>
+              <legend>
+              <b>Ausgabeformat</b>
+              </legend>
+              <TMPL_VAR select_options>
+              </fieldset>
+              
+            <TMPL_ELSE>
+
+              <td width="50%" valign="bottom">
+              <fieldset>
+              <legend>
+              <b>Hinweise</b>
+              </legend>
+              <h2 class="confirm">
+              Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!
+              </h2>
+              <h3>Hilfe</h3>
+              <ul>
+              <li>Bitte fehlende USTVA Einstellungen ergänzen (Menüpunkt: Programm)</li>
+              </ul>
+              </fieldset>
+
+            </TMPL_IF>
+          </td>
+        </tr>
+      </table>
+     </td>
+    </tr>
+    <tr>
+     <td><hr size="3" noshade></td>
+    </tr>
+  </table>
+
+  <br>
+  <input type="hidden" name="address" value="<TMPL_VAR address>">
+  <input type="hidden" name="reporttype" value="custom">
+  <input type="hidden" name="co_street" value="<TMPL_VAR co_street>">
+  <input type="hidden" name="co_city" value="<TMPL_VAR co_city>">
+  <input type="hidden" name="path" value="<TMPL_VAR path>">
+  <input type="hidden" name="login" value="<TMPL_VAR login>">
+  <input type="hidden" name="password" value="<TMPL_VAR password>">
+  <table width="100%">
+  <tr>
+   <td align="left">
+     <input type=hidden name=nextsub value=generate_ustva>
+     <input <TMPL_UNLESS FA_Name>disabled="disabled"</TMPL_UNLESS>
+      type=submit class=submit name=action value="Zeigen">
+   </td>
+   <td align="right">
+
+    </form>
+    <!--
+      <form action="doc/ustva.html" method="get">
+       <input type=submit class=submit name=action
+       value="Hilfe">
+   </form>
+    -->
+   </td>
+  </tr>
+  </table>   
+</body>
+</html>
+            
+            
+          
+          
+          
diff --git a/templates/webpages/ustva/report_master.html b/templates/webpages/ustva/report_master.html
new file mode 100644 (file)
index 0000000..17c6b01
--- /dev/null
@@ -0,0 +1,227 @@
+<!--This file is autogenerated,
+ Edit templates/webpages/ustva/report_master.html
+ and run locale/<cc>/locales.pl -->
+  
+ <body>
+ <form method="post" action="<TMPL_VAR script ESCAPE=HTML>">
+
+ <input type="hidden" name="title" value="<TMPL_VAR title ESCAPE=HTML>">
+
+ <table width="100%">
+  <tr>
+    <th class="listtop"><TMPL_VAR title ESCAPE=HTML></th>
+  </tr>
+  <tr height="5"></tr>
+  <tr>
+    <td>
+      <table>
+       <tr>
+         <td width="50%" align="left" valign="top">
+            <fieldset>
+            <legend>
+            <b><translate>Company</translate></b>
+            </legend>
+            
+            <TMPL_VAR company_given>
+            <TMPL_VAR address_given>
+            
+            <br />
+            <br />
+            <translate>Tel</translate>.:&nbsp;
+            <TMPL_VAR co_tel ESCAPE=HTML>
+            <br />
+            <translate>Fax</translate>.:&nbsp;
+            <TMPL_VAR co_fax ESCAPE=HTML>
+            <br />
+            <br />
+            <TMPL_VAR co_email ESCAPE=HTML>
+            <br />
+            <br />
+            <translate>Tax Number</translate>:&nbsp;
+            <TMPL_VAR taxnumber_given>
+            <br />
+            <translate>ELSTER Tax Number</translate>:&nbsp;
+            <TMPL_VAR elstersteuernummer ESCAPE=HTML>
+            <br />
+            <br />
+
+            </fieldset>
+            <br />
+            
+            <TMPL_IF FA_steuerberater_name>
+              <fieldset>
+              <legend>
+                <input checked="checked" 
+                 title = "<translate>Assume Tax Consultant Data in Tax Computation?</translate>"
+                 name = "FA_steuerberater" 
+                 id = "steuerberater" 
+                 class = "checkbox" 
+                 type = "checkbox"
+                 value = "1" >
+                 &nbsp;<b><translate>Tax Consultant</translate></b>
+                </legend>
+                
+                <TMPL_VAR FA_steuerberater_name ESCAPE=HTML><br />
+                <TMPL_VAR FA_steuerberater_street ESCAPE=HTML><br />
+                <TMPL_VAR FA_steuerberater_city ESCAPE=HTML><br />
+                <translate>Tel.</translate> <TMPL_VAR FA_steuerberater_tel ESCAPE=HTML><br />
+              </fieldset>
+              <br />
+            </TMPL_IF>
+
+            <fieldset>
+            <legend>
+            <b><translate>Tax Period</translate></b>
+            </legend>
+            <TMPL_VAR select_year> <TMPL_VAR ustva_vorauswahl>
+            <TMPL_VAR checkbox_kz_10>
+            <br />
+            <TMPL_IF FA_voranmeld>
+              <br />
+              <TMPL_VAR period_local>
+              <TMPL_IF FA_dauerfrist>
+                <translate>With Extension Of Time</translate>
+              </TMPL_IF>
+              <br />
+            </TMPL_IF>
+            
+            <TMPL_IF method_local>
+              <translate>Method</translate>: <TMPL_VAR method_local>
+            </TMPL_IF>
+            </fieldset>
+          </td>
+          <td width="50%" valign="top">          
+
+<!--            TMPL_IF FA_Name                   -->
+
+              <fieldset>
+              <legend>
+                 <b><translate>Tax Office</translate></b>
+              </legend>
+              <h3><TMPL_VAR FA_Name ESCAPE=HTML></h3>
+            
+              <TMPL_VAR FA_Strasse ESCAPE=HTML>
+              <br>
+              <TMPL_VAR FA_PLZ ESCAPE=HTML>&nbsp; &nbsp;<TMPL_VAR FA_Ort
+                ESCAPE=HTML>
+              <br>
+              <br>
+              <translate>Tel</translate>.:&nbsp;
+              <TMPL_VAR FA_Telefon ESCAPE=HTML>
+              <br> 
+              <translate>Fax</translate>.:&nbsp;
+              <TMPL_VAR FA_Fax ESCAPE=HTML>
+              <br>
+              <br>
+              <!-- Mailto alles Maskieren! -->
+              <a href="mailto:<TMPL_VAR FA_Email ESCAPE=HTML>
+                ?subject=&quot;<TMPL_VAR steuernummer ESCAPE=HTML>:&quot;
+                &amp;bcc=&quot;<TMPL_VAR email ESCAPE=HTML>&quot;
+                &amp;body=&quot;Sehr%20geehrte%20Damen%20und%20Herren,
+                %0D%0A%0D%0A%0D%0AMit%20freundlichen%20Gr&uuml;&szlig;en
+                %0D%0A%0D%0A<TMPL_VAR signature ESCAPE=HTML>&quot;">
+              <TMPL_VAR FA_Email ESCAPE=HTML>
+              </a>
+              <br>
+              <a href="<TMPL_VAR FA_Internet>">
+              <TMPL_VAR FA_Internet ESCAPE=HTML>
+              </a>
+              <br>
+              <br>
+              <translate>Openings</translate>
+              <br>
+              <TMPL_VAR openings ESCAPE=NONE>
+              <br>
+              <br>
+              <translate>Bank Connections</translate>
+              <table>
+              <tr>
+
+              <TMPL_LOOP NAME="tax_office_banks">
+                  <td width="40%">
+                  <TMPL_VAR Bankbezeichnung ESCAPE=HTML>
+                  <br>                  
+                  <translate>Account</translate>:&nbsp;
+                  <TMPL_VAR Kontonummer ESCAPE=HTML>
+                  <br>
+                  <translate>Bank Code</translate>:&nbsp;
+                  <TMPL_VAR BLZ ESCAPE=HTML>
+                  </td>
+              </TMPL_LOOP>
+
+              </tr>
+              </table>
+              <br>
+              </fieldset>
+              
+              <br> 
+              
+              <fieldset>
+              <legend>
+              <b><translate>Outputformat</translate></b>
+              </legend>
+              <TMPL_VAR select_options>
+              </fieldset>
+              
+            <TMPL_ELSE>
+
+              <td width="50%" valign="bottom">
+              <fieldset>
+              <legend>
+              <b><translate>Hints</translate></b>
+              </legend>
+              <h2 class="confirm">
+              <translate>Missing Preferences: Outputroutine
+                 disabled</translate>
+              </h2>
+              <h3><translate>Help</translate></h3>
+              <ul>
+              <li><translate>Hint-Missing-Preferences</translate></li>
+              </ul>
+              </fieldset>
+
+            </TMPL_IF>
+          </td>
+        </tr>
+      </table>
+     </td>
+    </tr>
+    <tr>
+     <td><hr size="3" noshade></td>
+    </tr>
+  </table>
+
+  <br>
+  <input type="hidden" name="address" value="<TMPL_VAR address>">
+  <input type="hidden" name="reporttype" value="custom">
+  <input type="hidden" name="co_street" value="<TMPL_VAR co_street>">
+  <input type="hidden" name="co_city" value="<TMPL_VAR co_city>">
+  <input type="hidden" name="path" value="<TMPL_VAR path>">
+  <input type="hidden" name="login" value="<TMPL_VAR login>">
+  <input type="hidden" name="password" value="<TMPL_VAR password>">
+  <table width="100%">
+  <tr>
+   <td align="left">
+     <input type=hidden name=nextsub value=generate_ustva>
+     <input <TMPL_UNLESS FA_Name>disabled="disabled"</TMPL_UNLESS>
+      type=submit class=submit name=action value="<translate>Show</translate>">
+   </td>
+   <td align="right">
+
+    </form>
+    <!--
+      <form action="doc/ustva.html" method="get">
+       <input type=submit class=submit name=action
+       value="<translate>Help</translate>">
+   </form>
+    -->
+   </td>
+  </tr>
+  </table>   
+</body>
+</html>
+            
+            
+          
+          
+          
\ No newline at end of file