Bug bei Behandlung der 'alten' Variablenwerte in die neuen Variablennamen
[kivitendo-erp.git] / bin / mozilla / ustva.pl
index a40388a..1ebd6ac 100644 (file)
@@ -163,10 +163,10 @@ sub report {
          <a href=am.pl?path=$form->{path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}>
          | . $locale->text('Keine Firmenadresse hinterlegt!') . 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}='';
+  $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|
@@ -1011,13 +1011,25 @@ sub generate_ustva {
     $form->{endbold} = "}";
     $form->{br}      = '\\\\';
 
+    
     my @numbers = qw(51r 86r 97r 93r 96 43 45
       66 62 67);
     my $number = '';
-    foreach $number (@numbers) {
-      $form->{$number} =~ s/,/~~/g;
+    # 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;
+      }
     }
-      } elsif ($form->{format} eq 'html') {
+  # Formatierungen für HTML Ausgabe
+  } elsif ($form->{format} eq 'html') {
     $form->{padding} = "&nbsp;&nbsp;";
     $form->{bold}    = "<b>";
     $form->{endbold} = "</b>";