X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fustva.pl;h=99210941cc879ed23e202e57bcaec1acd25625e5;hb=bb99760f9239bca52db6f4496bdb7aaa9055fbf7;hp=e04bc458af42f9cf37aeb3a00e999a05e257a6b9;hpb=d319704a66e9be64da837ccea10af6774c2b0838;p=kivitendo-erp.git diff --git a/bin/mozilla/ustva.pl b/bin/mozilla/ustva.pl index e04bc458a..99210941c 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"; @@ -76,13 +76,11 @@ sub report { $form->{title} = $locale->text('UStVA'); $form->{kz10} = ''; #Berichtigte Anmeldung? Ja =1 - # $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 +108,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 +139,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 +192,10 @@ sub report { Keine Steuernummer hinterlegt!|; } print qq| - + @@ -214,7 +232,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| } @@ -395,31 +413,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| @@ -427,14 +420,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| |; @@ -461,8 +452,8 @@ sub report { - - + + @@ -472,8 +463,6 @@ sub report { - @@ -493,7 +482,6 @@ sub report {