commit 6ab3da458ff5a2be533e0ae1fdde6a6dbd9ef93f
Author: Udo Spallek <info@wissensvermittlung.com>
Date:   Thu Jan 18 17:17:27 2007 +0000

    - Bugfix: 499, 502, 442
    - Zahlenformatierung wird nun getrennt nach Ausgabeformat durchgefuehrt
    - Verbesserter bei Taxbirdexport

diff --git a/SL/USTVA.pm b/SL/USTVA.pm
index 505efb438..59e41b7b0 100644
--- a/SL/USTVA.pm
+++ b/SL/USTVA.pm
@@ -568,19 +568,19 @@ sub ustva {
 
   my $last_period     = 0;
   my $category        = "pos_ustva";
-  my @categories_cent = qw(511 861 36 80 971 931 98 96 53 74
+  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 @categories_euro = qw(41 44 49 43 48 51 86 35 77 76 91 97 93
+  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;
 
-  foreach $item (@categories_cent) {
+  foreach $item (@category_cent) {
     $form->{"$item"} = 0;
   }
-  foreach $item (@categories_euro) {
+  foreach $item (@category_euro) {
     $form->{"$item"} = 0;
   }
 
@@ -590,31 +590,23 @@ sub ustva {
   #
   # Berechnung der USTVA Formularfelder
   #
+
   $form->{"51r"} = $form->{"511"};
   $form->{"86r"} = $form->{"861"};
   $form->{"97r"} = $form->{"971"};
   $form->{"93r"} = $form->{"931"};
   $form->{"Z43"} =
-    $form->{"511"} + $form->{"861"} + $form->{"36"} + $form->{"80"} +
-    $form->{"971"} + $form->{"931"} + $form->{"96"} + $form->{"98"};
+  $form->{"511"} + $form->{"861"} + $form->{"36"} + $form->{"80"} +
+  $form->{"971"} + $form->{"931"} + $form->{"96"} + $form->{"98"};
   $form->{"Z45"} = $form->{"Z43"};
   $form->{"Z53"} = $form->{"Z43"};
   $form->{"Z62"} =
-    $form->{"Z43"} - $form->{"66"} - $form->{"61"} - $form->{"62"} -
-    $form->{"63"} - $form->{"64"} - $form->{"59"};
+  $form->{"Z43"} - $form->{"66"} - $form->{"61"} - $form->{"62"} -
+  $form->{"63"} - $form->{"64"} - $form->{"59"};
   $form->{"Z65"} = $form->{"Z62"} - $form->{"69"};
   $form->{"83"}  = $form->{"Z65"} - $form->{"39"};
-
-  foreach $item (@categories_cent) {
-    $form->{$item} =
-      $form->format_amount($myconfig, $form->{$item}, '2', '0');
-  }
-
-  foreach $item (@categories_euro) {
-    $form->{$item} =
-      $form->format_amount($myconfig, $form->{$item}, '0', '0');
-  }
-
+  # Hier fehlen moeglicherweise noch einige Berechnungen!
+  
   $dbh->disconnect;
 
   $main::lxdebug->leave_sub();
@@ -784,9 +776,7 @@ sub get_accounts_ustva {
 
   while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
 # Bug 365 solved?!
-#    if ($ref->{amount} < 0) {
-      $ref->{amount} *= -1;
-#    }
+   $ref->{amount} *= -1;
     if ($category eq "pos_bwa") {
       if ($last_period) {
         $form->{ $ref->{$category} }{kumm} += $ref->{amount};
diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl
index 6f097c7e1..a4b4feff1 100644
--- a/bin/mozilla/ustva.pl
+++ b/bin/mozilla/ustva.pl
@@ -77,23 +77,20 @@ sub report {
   $form->{title} = $locale->text('UStVA');
   $form->{kz10}  = '';                       #Berichtigte Anmeldung? Ja =1 Nein=0
 
-  my $year = substr(
-                    $form->datetonum($form->current_date(\%myconfig),
-                                     \%myconfig
-                    ),
-                    0, 4);
+  my $year = substr($form->datetonum($form->current_date(\%myconfig), \%myconfig ),
+             0, 4);
 
   my $department = '';
   local $hide = '';
   $form->header;
 
   print qq|
-<body>
-<form method=post action=$form->{script}>
+ <body>
+ <form method=post action=$form->{script}>
 
-<input type=hidden name=title value="$form->{title}">
+ <input type=hidden name=title value="$form->{title}">
 
-<table width=100%>
+ <table width=100%>
   <tr>
     <th class=listtop>$form->{title}</th>
   </tr>
@@ -102,7 +99,7 @@ sub report {
     <td>
       <table>
       $department
-|;
+ |;
 
   # Hier Aufruf von get_config aus bin/mozilla/fa.pl zum
   # Einlesen der Finanzamtdaten
@@ -656,23 +653,23 @@ sub ustva_vorauswahl {
   SWITCH: {
       $yymmdd <= ($yy + 110 + $dfv) && do {
         $form->{year} = $form->{year} - 1;
-        $sel = 'D';
+        $sel = '44';
         last SWITCH;
       };
       $yymmdd <= ($yy + 410 + $dfv) && do {
-        $sel = 'A';
+        $sel = '41';
         last SWITCH;
       };
       $yymmdd <= ($yy + 710 + $dfv) && do {
-        $sel = 'B';
+        $sel = '42';
         last SWITCH;
       };
       $yymmdd <= ($yy + 1010 + $dfv) && do {
-        $sel = 'C';
+        $sel = '43';
         last SWITCH;
       };
       $yymmdd <= ($yy + 1231) && do {
-        $sel = 'D';
+        $sel = '44';
       };
     }
 
@@ -794,7 +791,7 @@ sub generate_ustva {
 
   get_config($userspath, 'finanzamt.ini');
 
-  # form vars initialisieren
+  # init some form vars
   my @anmeldungszeitraum =
     qw('0401' '0402' '0403' '0404' '0405' '0405' '0406' '0407' '0408' '0409' '0410' '0411' '0412' '0441' '0442' '0443' '0444');
   foreach my $item (@anmeldungszeitraum) {
@@ -812,6 +809,10 @@ sub generate_ustva {
                         qq|Actual year from Database: $form->{year}\n|);
     }
 
+    #
+    # using dates in ISO-8601 format: yyyymmmdd  for Postgres...
+    #
+    
     #yearly report
     if ($form->{period} eq "13") {
       $form->{fromdate} = "$form->{year}0101";
@@ -919,13 +920,16 @@ sub generate_ustva {
       };
     }
 
-  # using dates in ISO-8601 format: yyyymmmdd  for Postgres...
+
+
+
+  # Get the USTVA
   USTVA->ustva(\%myconfig, \%$form);
 
   # reformat Dates to dateformat
   $form->{fromdate} = $locale->date(\%myconfig, $form->{fromdate}, 0, 0, 0);
 
-  $form->{todate} = $form->current_date($myconfig) unless $form->{todate};
+  $form->{todate} = $form->current_date(\%myconfig) unless $form->{todate};
   $form->{todate} = $locale->date(\%myconfig, $form->{todate}, 0, 0, 0);
 
   $form->{longperiod} =
@@ -972,7 +976,6 @@ sub generate_ustva {
     $locale->date(\%myconfig, $form->current_date(\%myconfig), 0, 0, 0);
 
   # setup variables for the form
-  # steuernummer für prerelease entfernt
   my @a = qw(company 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
@@ -989,43 +992,39 @@ sub generate_ustva {
     $form->{co_city} =~ s/\\n//g;
   }
 
+  #
+  # Outputformat specific customisation's
+  #
+
+  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);
+
   if ( $form->{format} eq 'pdf' or $form->{format} eq 'postscript') {
 
     $form->{IN} = "$form->{type}-$form->{year}.tex";
-
     $form->{padding} = "~~";
     $form->{bold}    = "\textbf{";
     $form->{endbold} = "}";
     $form->{br}      = '\\\\';
 
-    my @numbers = qw(511 861 36 80 971 931 98 96 53 74
-      85 65 66 61 62 Z67 63 64 59 69 39 83
-      Z43 Z45 Z53 Z62 Z65);
-
-    my $number = '';
-
     # Zahlenformatierung für Latex USTVA Formulare
-    if (   $myconfig{numberformat} eq '1.000,00'
-           or $myconfig{numberformat} eq '1000,00') {
-      foreach $number (@numbers) {
-        $form->{$number} =~ s/,/~~/g;
-      }
-    }
-    if (   $myconfig{numberformat} eq '1000.00'
-        or $myconfig{numberformat} eq '1,000.00') {
-      foreach $number (@numbers) {
-        $form->{$number} =~ s/\./~~/g;
-      }
+
+    foreach my $number (@category_euro) {
+      $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '0', '');
     }
-    if ( $form->{period} eq '13'){ #Catch yearly USTE for now, not yet implemented.
-      $form->header;
-      USTVA::error(
-        $locale->text(
-        'Impossible to create yearly Tax Report as PDF or Postscript<br \> Not yet implemented!'
-        )
-      );
+
+    my ${decimal_comma} = ( $myconfig{numberformat} eq '1.000,00'
+         or $myconfig{numberformat} eq '1000,00' ) ? ',':'.';
+
+    foreach my $number (@category_cent) {
+      $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '2', '');
+      $form->{$number} =~ s/${decimal_comma}/~~/g;
     }
-      
+
   } elsif ( $form->{format} eq 'html') { # Formatierungen für HTML Ausgabe
 
     $form->{IN} = $form->{type} . '.html';
@@ -1035,92 +1034,139 @@ sub generate_ustva {
     $form->{br}      = "<br>";
     $form->{address} =~ s/\\n/\n/g;
 
-  } elsif ($form->{format} =~ /^elster/) {
-
-    if ( $form->{period} eq '13' ) {
-      $form->header;
-      USTVA::info(
-        $locale->text(
-        'Impossible to create yearly Tax Report via Winston or Taxbird.<br \> Not yet implemented!'
-      ));
+    foreach $number (@category_cent) {
+      $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '2', '0');
     }
+    
+    foreach $number (@category_euro) {
+      $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '0', '0');
+    }
+
+  } elsif ( $form->{format} eq 'elsterwinston' ) {
+
+    $form->{IN} = 'winston.xml';
+    
+    #
+    # Build Winston filename
+    #
+    
+    my $file = 'U';     # 1. char 'U' = USTVA
+    $file .= $form->{period};
+    #4. and 5. char = year modulo 100
+    $file .= sprintf("%02d", $form->{year} % 100);
+    #6. to 18. char = Elstersteuernummer
+    #Beispiel: Steuernummer in Bayern
+    #111/222/33334 ergibt für UStVA Jan 2004: U01049111022233334
+    $file .= $form->{elsterFFFF};
+    $file .= $form->{elstersteuernummer};
+    #file suffix
+    $file .= '.xml';
+    $form->{tmpfile} = "$userspath/$file";
+
+    $form->{attachment_filename} = "$file";
+ 
+    # Zahlenformatierung für Winston
+
+    my $temp_numberformat = $myconfig{numberformat};
 
-    if ( $form->{format} eq 'elsterwinston' ) {
-
-      $form->{IN} = 'winston.xml';
-     
-      # Build Winston filename
-      my $file = 'U';     # 1. char 'U' = USTVA
-      $file .= $form->{period};
-      #4. and 5. char = year modulo 100
-      $file .= sprintf("%02d", $form->{year} % 100);
-      #6. to 18. char = Elstersteuernummer
-      #Beispiel: Steuernummer in Bayern
-      #111/222/33334 ergibt für UStVA Jan 2004: U01049111022233334
-      $file .= $form->{elsterFFFF};
-      $file .= $form->{elstersteuernummer};
-      #file suffix
-      $file .= '.xml';
-      $form->{tmpfile} = "$userspath/$file";
+    # Numberformat must be '1000.00' for Winston
+
+    $myconfig{numberformat} = '1000.00';
+
+    foreach my $number (@category_cent) {
+      $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '2', '') : '';
+    }
+    
+    foreach my $number (@category_euro) {
+      $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '0', '') : '';
     }
+    # Re-set Numberformat
+    $myconfig{numberformat} = $temp_numberformat;
 
-    if ( $form->{format} eq 'elstertaxbird' ) {
+  }
+
+  elsif ( $form->{format} eq 'elstertaxbird' ) {
 
-      $form->{IN} = 'taxbird.txb';
-     
-      $form->{tmpfile} = "$userspath/USTVA-" . $form->{period} 
-      . sprintf("%02d", $form->{year} % 100) . ".txb";
+    $form->{IN} = 'taxbird.txb';
 
-      if ($form->{period} =~ /^[4]\d$/ ){
-        my %periods = ( # Lx => taxbird
-                     '41' => '12',
-                     '42' => '13',
-                     '43' => '14',
-                     '44' => '15',
-                   );
+    $form->{attachment_filename} = "USTVA-" . $form->{period} 
+    . sprintf("%02d", $form->{year} % 100) . ".txb";
+    
+    $form->{tmpfile} = "$userspath/" . $form->{attachment_filename};
+
+    if ($form->{period} =~ /^[4]\d$/ ){
+      my %periods = ( # Lx => taxbird
+                   '41' => '12',
+                   '42' => '13',
+                   '43' => '14',
+                   '44' => '15',
+                 );
+    
+      foreach my $quarter ( keys %periods ) {
+        $form->{taxbird_period} = $periods{$quarter} if ( $form->{period} eq $quarter);
+      }
+      
+      my %lands = ( # Lx => taxbird # TODO: besser als array...
+                  'Baden Würtemberg'       => '0',
+                  'Bayern'                 => '1',
+                  'Berlin'                 => '2',
+                  'Brandenburg'            => '3',
+                  'Bremen'                 => '4',
+                  'Hamburg'                => '5',
+                  'Hessen'                 => '6',
+                  'Mecklenburg Vorpommern' => '7',
+                  'Niedersachsen'          => '8',
+                  'Nordrhein Westfalen'    => '9',
+                  'Rheinland Pfalz'        => '10',
+                  'Saarland'               => '11',
+                  'Sachsen'                => '12',
+                  'Sachsen Anhalt'         => '13',
+                  'Schleswig Holstein'     => '14',
+                  'Thüringen'              => '15',
+            );
+
+      foreach my $land ( keys %lands ){
+        $form->{taxbird_land_nr} = $lands{$land} if ($form->{elsterland} eq $land );
+      }
       
-        foreach my $quarter ( keys %periods ) {
-          $form->{period} = $periods{$quarter} if ( $form->{period} eq $quarter);
-        }
-        
-        my %lands = ( # Lx => taxbird # TODO: besser als array...
-                    'Baden Würtemberg'       => '0',
-                    'Bayern'                 => '1',
-                    'Berlin'                 => '2',
-                    'Brandenburg'            => '3',
-                    'Bremen'                 => '4',
-                    'Hamburg'                => '5',
-                    'Hessen'                 => '6',
-                    'Mecklenburg Vorpommern' => '7',
-                    'Niedersachsen'          => '8',
-                    'Nordrhein Westfalen'    => '9',
-                    'Rheinland Pfalz'        => '10',
-                    'Saarland'               => '11',
-                    'Sachsen'                => '12',
-                    'Sachsen Anhalt'         => '13',
-                    'Schleswig Holstein'     => '14',
-                    'Thüringen'              => '15',
-              );
-
-
-        foreach my $land ( keys %lands ){
-          $form->{elsterland} = $lands{$land} if ($form->{elsterland} eq $land );
-        }
-      } elsif ($form->{period} =~ /^\d+$/ ) {
-        $form->{period} =~ s/^0//g;
-        my $period = $form->{period};
-        $period * 1;
-        $period--;
-        $form->{period} = $period;
-       } else {
-         $form->header;
-         USTVA::error( $locale->text('Wrong Period' ));
-         exit(0);
-                
-       }
+      $form->{taxbird_steuernummer} = $form->{steuernummer};
+      $form->{taxbird_steuernummer} =~ s/\D//g;
       
+      $form->{co_zip} = $form->{co_city};
+      $form->{co_zip} =~ s/\D//g;
+      $form->{co_city} =~ s/\d//g;
+      $form->{co_city} =~ s/^\s//g;
+      
+      ($form->{co_phone_prefix}, $form->{co_phone}) = split("-", $form->{tel});
+      
+      # Numberformatting for Taxbird
+
+      my $temp_numberformat = $myconfig{numberformat};
+      # Numberformat must be '1000.00' for Taxbird ?!
+
+      $myconfig{numberformat} = '1000.00';
+
+      foreach my $number (@category_cent) {
+        $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '2', '') : '';
+      }
+      
+      foreach my $number (@category_euro) {
+        $form->{$number} = ( $form->{$number} !=0 ) ? $form->format_amount(\%myconfig, $form->{$number}, '0', '') : '';
+      }
+      # Re-set Numberformat
+      $myconfig{numberformat} = $temp_numberformat;
+      
+    } elsif ($form->{period} =~ /^\d+$/ ) {
+      $form->{period} =~ s/^0//g;
+      my $period = $form->{period};
+      $period * 1;
+      $period--;
+      $form->{period} = $period;
+    } else {
+      $form->header;
+      USTVA::error( $locale->text('Wrong Period' ));
+      exit(0);
     }
-    # Other Elster formats follow here...
     
   } elsif ( $form->{format} eq '' ){ # No format error.
     $form->header;
@@ -1132,12 +1178,19 @@ sub generate_ustva {
     USTVA::error( $locale->text('Application Error. Wrong Format: ') . $form->{format} );
     exit(0);
   }
+
+  if ( $form->{period} eq '13' and $form->{format} ne 'html') {
+    $form->header;
+    USTVA::info(
+      $locale->text(
+      'Yearly taxreport not yet implemented')
+      . '!');
+  }
     
-  
   $form->{templates} = $myconfig{templates};
   $form->{templates} = "doc" if ( $form->{type} eq 'help' );
 
-  $form->parse_template($myconfig, $userspath);
+  $form->parse_template(\%myconfig, $userspath);
 
   $lxdebug->leave_sub();
 }
diff --git a/templates/German-taxbird.txb b/templates/German-taxbird.txb
index 49dfe7176..6cbc69eb6 100644
--- a/templates/German-taxbird.txb
+++ b/templates/German-taxbird.txb
@@ -1,21 +1,22 @@
-;; This file was produced using taxbird. 
+;; This file was produced using lx-office
+;; for using in taxbird. 
 ;; You probably don't want to touch this 
 ;; file. In case you do want it anyway, 
 ;; be warned: BE CAREFUL!!
 ;;
 '("Umsatzsteuervoranmeldung <%year%>" (
 ("vend-id" . "74931")
-("land-lieferant" . "<%nation%>")
+("land-lieferant" . "<%elsterland%>")
 ("name-lieferant" . "<%company%>")
 ("berufsbez" . "")
 ("strasse-lieferant" . "<%co_street%>")
-("plz-lieferant" . "<%co_zip%>")
+("plz-lieferant" . "<%co_zip%> ")
 ("ort-lieferant" . "<%co_city%>")
-("vorwahl" . "")
+("vorwahl" . "<%co_phone_prefix%>")
 ("anschluss" . "<%co_phone%>")
-("land" . "<%elsterland%>")
-("zeitraum" . "<%period%>")
-("stnr" . "<%steuernummer%>")
+("land" . "<%taxbird_land_nr%>")
+("zeitraum" . "<%taxbird_period%>")
+("stnr" . "<%taxbird_steuernummer%>")
 
 <%if 10%>("Kz10" . "<%10%>")<%end 10%>
 <%if 22%>("Kz22" . "<%22%>")<%end 22%>
diff --git a/templates/German-ustva-2007.tex b/templates/German-ustva-2007.tex
new file mode 100644
index 000000000..7032221e8
--- /dev/null
+++ b/templates/German-ustva-2007.tex
@@ -0,0 +1,128 @@
+% German USTVA template for taxreports
+%
+% Contributed by Jens Koerner, Peter Schorer, Udo Spallek
+%
+%
+\documentclass[twoside]{scrartcl}
+\usepackage{a4,german}
+\usepackage[frame]{xy}
+\usepackage[latin1]{inputenc}
+\usepackage[german]{babel}
+\usepackage{graphicx}
+\usepackage{tabularx}
+\usepackage{times, german}
+\usepackage{german}
+\setlength{\voffset}{-0.8cm} %hier wird die Höhenverschiebung getätigt
+\setlength{\hoffset}{-1cm}  %und hier die Verschiebung seitwärts
+\setlength{\topmargin}{0cm}
+\setlength{\headheight}{0cm}
+\setlength{\headsep}{0cm}
+\setlength{\topskip}{0pt}
+\setlength{\oddsidemargin}{0cm}
+\setlength{\evensidemargin}{0cm}
+\setlength{\textwidth}{20.9cm}
+\setlength{\textheight}{29.6cm}
+\setlength{\footskip}{-0cm}
+\setlength{\parindent}{0pt}
+
+\begin{document}
+
+\fontfamily{cmss}\fontshape{n}\large\selectfont
+\pagestyle{myheadings}
+\markboth{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 54 783 700 790]{ustva-2007-2.pdf}}}
+{\protect\scalebox{1.045}[1.045]{\protect\includegraphics[viewport = 70 700 700 790]{ustva-2007-1.pdf}}}
+\hspace{1mm}
+\begin{tabular}[b]{p{7mm}p{5cm}p{22.5mm}p{24mm}p{7mm}p{28mm}p{3mm}}
+\multicolumn{7}{c}{}\\[-2mm]
+ &  \multicolumn{6}{l}{<%steuernummer%>}\\
+\multicolumn{7}{c}{}\\[15mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Name%>} & & & & &\\[-4mm]
+\multicolumn{2}{p{7.5cm}}{}  & & & & &\\[3mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_Strasse%>} & &<%0401%>&<%0407%>&&<%0441%>\\[1.2mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0402%>&<%0408%>&&<%0442%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{<%FA_PLZ%> <%FA_Ort%>} & &<%0403%>&<%0409%>&&<%0443%>\\[3mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0404%>&<%0410%>&&<%0444%>\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{} & &<%0405%>&<%0411%>&&\\[1.25mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%company%>}} & &<%0406%>&<%0412%>&&\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%co_street%>}}& & & & &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%co_city%>}}& & & &<%FA_10%> &\\[1mm]
+\multicolumn{2}{p{7.5cm}}{
+<%if tel%>
+\small{Tel: <%tel%>}~--~
+<%end tel%>
+<%if fax%>
+\small{Fax: <%fax%>}
+<%end fax%>
+}& & & & &\\[-1mm]
+\multicolumn{2}{p{7.5cm}}{\small{<%email%>}}& & & & &\\[-1mm]
+\end{tabular}\\[29.5mm]
+\begin{tabular}[b]{p{99mm}p{26.5mm}p{4.55mm}p{4mm}p{35mm}}
+&&&&\\[20.5mm]
+\multicolumn{2}{r}{<%48%>} & & \multicolumn{2}{r}{}\\[7.5mm]
+\multicolumn{2}{r}{<%51%>} & & \multicolumn{2}{r}{<%511%>}\\[1.5mm]
+\multicolumn{2}{r}{<%86%>} & & \multicolumn{2}{r}{<%861%>}\\[42mm]
+\multicolumn{2}{r}{<%97%>} & & \multicolumn{2}{r}{<%971%>}\\[1.5mm]
+\multicolumn{2}{r}{<%93%>} & & \multicolumn{2}{r}{<%931%>}\\[8.5mm]
+\multicolumn{2}{r}{<%94%>} & & \multicolumn{2}{r}{<%96%>}\\[28mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z43%>}\\
+\end{tabular}
+
+\newpage
+
+\vspace*{-9.5mm}\hspace{27mm}<%steuernummer%>\\[-2.7mm]
+\begin{tabular}[b]{p{99mm}p{25.2mm}p{2.55mm}p{10mm}p{32mm}}
+&&&&\\
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z45%>}\\[48mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z53%>}\\[8.9mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%66%>}\\[42mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{<%Z62%>}\\[28mm]
+\multicolumn{2}{r}{} & & \multicolumn{2}{r}{\textbf{<%83%>}}\\[26mm]
+\end{tabular}\\[35mm]
+<%if FA_steuerberater%>
+\vspace{11mm}
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item <%FA_steuerberater_name%>
+\item <%FA_steuerberater_street%>
+\item <%FA_steuerberater_city%>
+\item Tel:~<%FA_steuerberater_tel%>
+\end{small}\\[15mm]
+\item  <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+<%if not FA_steuerberater%>
+\begin{list}{}{
+\setlength{\leftmargin}{2mm}
+\setlength{\itemsep}{0mm}
+\setlength{\parsep}{0mm}
+%\setlength{\topsep}{0mm}
+%\setlength{\parskip}{0mm}
+%\setlength{\partopsep}{0mm}
+}
+\begin{small}
+\item ~
+\item ~
+\item ~
+\item ~
+\end{small}\\[26mm]
+\item  <%Datum_heute%>,
+\end{list}
+<%end FA_steuerberater%>
+\end{document}
+
+
+
+
+
+
+
+
+
+
diff --git a/templates/German-ustva.html b/templates/German-ustva.html
index 998f11598..42170629d 100644
--- a/templates/German-ustva.html
+++ b/templates/German-ustva.html
@@ -391,6 +391,6 @@ Steuerberater:<br />
 <%FA_steuerberater_street%><br />
 <%FA_steuerberater_city%><br />
 Tel:&nbsp;<%FA_steuerberater_tel%></p>
-<%end FA_steuerberater%>>
+<%end FA_steuerberater%>
 </body>
 </html>
diff --git a/users/ustva-2007-1.pdf b/users/ustva-2007-1.pdf
new file mode 100644
index 000000000..7181c626d
Binary files /dev/null and b/users/ustva-2007-1.pdf differ
diff --git a/users/ustva-2007-2.pdf b/users/ustva-2007-2.pdf
new file mode 100644
index 000000000..616daba38
Binary files /dev/null and b/users/ustva-2007-2.pdf differ
