X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fustva.pl;h=6b25b7875a803f143f655604a6f7bad0dbe3f317;hb=3db7bbb21243d2f9de903b41f590f82dae64c161;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|$_\n| } @@ -236,7 +255,8 @@ sub report { $checked = "checked" if ($form->{kz10} eq '1'); print qq| | . $locale->text('Berichtigte Anmeldung') . qq| @@ -266,7 +286,7 @@ sub report { if ($form->{FA_Name} ne '') { print qq| - + | . $locale->text('Finanzamt') . qq| @@ -288,7 +308,7 @@ sub report { | . $locale->text('Tel. : ') . qq| $form->{FA_Telefon} - + | . $locale->text('Fax. : ') . qq| $form->{FA_Fax} @@ -330,7 +350,7 @@ sub report { $form->{FA_Bankbezeichnung_1} - + | . $locale->text('Konto: ') . qq| $form->{FA_Kontonummer_1} @@ -342,7 +362,7 @@ sub report { | . $locale->text('Konto: ') . qq| $form->{FA_Kontonummer_2} - + | . $locale->text('BLZ: ') . qq| $form->{FA_BLZ_2} @@ -356,10 +376,10 @@ sub report { $form->{FA_Bankbezeichnung_1} - + | . $locale->text('Konto: ') . qq| $form->{FA_Kontonummer_1} - + | . $locale->text('BLZ: ') . qq| $form->{FA_BLZ_1} |; @@ -370,10 +390,10 @@ sub report { $form->{FA_Bankbezeichnung_oertlich} - + | . $locale->text('Konto: ') . qq| $form->{FA_Kontonummer_2} - + | . $locale->text('BLZ: ') . qq| $form->{FA_BLZ_2} |; @@ -394,31 +414,6 @@ sub report { |; - # Stichtag der nächsten USTVA berechnen - # - # ($stichtag, $tage_bis, $ical) = FA->stichtag($today[dd.mm.yyyy], - # $FA_dauerfrist[1,0], - # $FA_voranmeld[month, quarter]) - #$tmpdateform= $myconfig{dateformat}; - # $myconfig{dateformat}= "dd.mm.yyyy"; - # $form->{today} = $form->datetonum($form->current_date(\%myconfig), \%myconfig); - # ($stichtag, $description, $tage_bis, $ical) = FA::stichtag($form->{today}, $form->{FA_dauerfrist},$form->{FA_voranmeld}); - # $form->{today} = $form->date($stichtag, \%myconfig ); - #$myconfig{dateformat}= $tmpdateform; - - #print qq| - # - # - # - # - # |.$locale->text('Anstehende Voranmeldungen').qq| - # - # $stichtag - # $description - # $form->{today} - # - # |; - } else { print qq| @@ -426,14 +421,12 @@ sub report { | . $locale->text('Hinweise') . qq| - Die Ausgabefunktionen sind wegen fehlender Daten deaktiviert. - Hilfe: + | + . $locale->text('Missing Preferences: Outputroutine disabled') + . qq| + | . $locale->text('Help:') . qq| - - Bitte 'Einstellungen' wählen um die Erweiterten UStVa Funktionen nutzen zu können. - - - Firmendaten können bei den Benutzereinstellungen verändert werden. + | . $locale->text('Hint-Missing-Preferences') . qq| |; @@ -460,8 +453,8 @@ sub report { - - + + @@ -471,8 +464,6 @@ sub report { - @@ -492,7 +483,6 @@ sub report {