X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fustva.pl;h=6b25b7875a803f143f655604a6f7bad0dbe3f317;hb=4e8f112f29ea92e2d820c9e9df57ca819e1708a5;hp=248af2b8f1adcad0bbbdc4dce05e3a9ff364e395;hpb=0d9ac875bf41d614388e6cf3864806de4c04c0e9;p=kivitendo-erp.git diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index 248af2b8f..6b25b7875 100644 --- a/bin/mozilla/ustva.pl +++ b/bin/mozilla/ustva.pl @@ -29,7 +29,7 @@ require "$form->{path}/arap.pl"; #use strict; #no strict 'refs'; #use diagnostics; -#use warnings FATAL=> 'all'; +#use warnings; # FATAL=> 'all'; #use vars qw($locale $form %myconfig); #our ($myconfig); #use CGI::Carp "fatalsToBrowser"; @@ -73,16 +73,15 @@ sub report { $lxdebug->enter_sub(); my $myconfig = \%myconfig; use CGI; + $form->{title} = $locale->text('UStVA'); - $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1 + $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1 Nein=0 - # $accrual = ($eur) ? "" : "checked"; - # $cash = ($eur) ? "checked" : ""; - my $year = ''; - my $null = ''; - ($null, $null, $null, $null, $null, $year, $null, $null, $null) = - localtime(); - $year += 1900; + my $year = substr( + $form->datetonum($form->current_date(\%myconfig), + \%myconfig + ), + 0, 4); my $department = ''; local $hide = ''; @@ -110,8 +109,16 @@ sub report { # 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 - company_street company_city company_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}; @@ -133,34 +140,46 @@ sub report { |; } - #klären, ob $form->{company_street|_address} gesetzt sind - ### + # 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/
/; - print qq|$temp|; - ($form->{company_street}, $form->{company_city}) = split("
{address} eq '' - and ($form->{company_street} ne '' and $form->{company_city} ne '')) { - print qq|$form->{company_street}
\n| if ($form->{company_street} ne ''); - print qq|$form->{company_city}\n| if ($form->{company_city} ne ''); - } elsif ($form->{company_street} eq '' or $form->{company_city} eq '') { + ($form->{co_street}, $form->{co_city}) = split("
", $temp); + $form->{co_city} =~ s/\\n//g; + } + + if ($form->{co_street} ne '' + and ( $form->{co_zip} ne '' + or $form->{co_city} ne '') + ) { + print qq| + $form->{co_street}
+ $form->{co_street1}
+ $form->{co_zip} $form->{co_city}|; + } else { print qq| {path}&action=config&level=Programm--Preferences&login=$form->{login}&password=$form->{password}> | . $locale->text('Keine Firmenadresse hinterlegt!') . qq|\n|; } + $form->{co_email} = $form->{email} unless $form->{co_email}; + $form->{co_tel} = $form->{tel} unless $form->{co_tel}; + $form->{co_fax} = $form->{fax} unless $form->{co_fax}; + $form->{co_url} = $form->{urlx} unless $form->{co_url}; print qq|

| . $locale->text('Tel.: ') . qq| - $form->{tel} + $form->{co_tel}
| . $locale->text('Fax.: ') . qq| - $form->{fax} + $form->{co_fax}

- $form->{email} + $form->{co_email}

| . $locale->text('Steuernummer: ') . qq| @@ -174,10 +193,10 @@ sub report { Keine Steuernummer hinterlegt!
|; } print qq| - +

@@ -192,7 +211,7 @@ sub report { . qq|" name="FA_steuerberater" id=steuerberater class=checkbox type=checkbox value="1">  | . $locale->text('Steuerberater/-in') . qq| - + $form->{FA_steuerberater_name}
$form->{FA_steuerberater_street}
$form->{FA_steuerberater_city}
@@ -214,7 +233,7 @@ sub report { # accounting years if SQL-Ledger Version < 2.4.1 # $year = $form->{year} * 1; - @years = sort { $b <=> $a } (2000 .. ($year)); + @years = sort { $b <=> $a } (2003 .. ($year + 1)); $form->{all_years} = \@years; } map { $form->{selectaccountingyear} .= qq| - + |; } print qq||; @@ -647,10 +642,11 @@ sub ustva_vorauswahl { } elsif ($form->{FA_voranmeld} eq 'quarter') { # Vorauswahl bei quartalsweisem Voranmeldungszeitraum - my %liste = ('A' => '1.', - 'B' => '2.', - 'C' => '3.', - 'D' => '4.',); + my %liste = ('A' => $locale->text('1. Quarter'), + 'B' => $locale->text('2. Quarter'), + 'C' => $locale->text('3. Quarter'), + 'D' => $locale->text('4. Quarter'), + '13' => $locale->text('Yearly'),); my $yy = $form->{year} * 10000; $yymmdd = "$form->{year}$form->{month}$form->{day}" * 1; @@ -688,9 +684,7 @@ sub ustva_vorauswahl { my $selected = ''; $selected = 'selected' if ($sel eq $key); print qq| - + |; } print qq|\n @@ -702,10 +696,10 @@ sub ustva_vorauswahl { print qq||; } @@ -747,7 +740,9 @@ sub config { } sub debug { + $lxdebug->enter_sub(); $form->debug(); + $lxdebug->leave_sub(); } sub show_options { @@ -763,7 +758,7 @@ sub show_options { qq| |; - if ($latex) { + if ($latex_templates) { $format .= qq|