-
-
-
- |;
- if ($form->{FA_steuerberater_name} ne ''){
- print qq|
-
-
- |;
+ my $ustva = USTVA->new();
+ $ustva->get_config();
+ $ustva->get_finanzamt();
+
+ my $geierlein_enabled = 0;
+ my $geierlein_path = $::lx_office_conf{paths}{geierlein_path};
+
+ if ( $geierlein_path && length($geierlein_path) > 0 ) {$geierlein_enabled=1;}
+
+# $::lxdebug->message(LXDebug->DEBUG2,"geierlein_enabled=".$geierlein_enabled." path=".$geierlein_path);
+ # Hier Einlesen der user-config
+ # steuernummer entfernt für prerelease
+ my @a = qw(
+ signature name
+ 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 co_fax co_fax1 co_email co_email1
+ co_url co_url1 co_bankname
+ co_bankname1 co_bankname2 co_bankname3 co_blz co_blz1
+ co_blz2 co_blz3 co_accountnr co_accountnr1 co_accountnr2
+ co_accountnr3
+ );
+
+ $form->{$_} = $myconfig{$_} for @a;
+
+ my $openings = $form->{fa_oeffnungszeiten};
+ $openings =~ s/\\\\n/ /g;
+
+ my $company_given = ($form->{company} ne '')
+ ? qq|$form->{company}\n|
+ : qq||
+ . $locale->text('No Company Name given') . qq|! |;
+
+
+ # 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/ /;
+ ($form->{co_street}, $form->{co_city}) = split(" ", $temp);
+ $form->{co_city} =~ s/\n//g;
}
- print qq|
-
-
- | |;
-
- if ($form->{FA_Name} ne ''){
- print qq|
-
-
-
-
- |;
-
-
-
- # 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|
- #
- #
- # |;
-
- } else {
- print qq|
- |
-
- |;
- my $ausgabe='';
- $hide = q|disabled="disabled"|;
- }
+ my $address_given =
+ ($form->{co_street} && ($form->{co_zip} || $form->{co_city}))
+ ? qq|$form->{co_street} |
+ . qq|$form->{co_street1} |
+ . qq|$form->{co_zip} $form->{co_city}|
+ : qq||
+ . $locale->text('No Company Address given')
+ . 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};
+
+ my $taxnumber_given = ($form->{taxnumber} ne '') ? $form->{taxnumber} : qq|Keine Steuernummer hinterlegt! |;
+ my $fa_name_given = ($form->{fa_name} ne '') ? $form->{fa_name} : qq|Kein Finanzamt hinterlegt! |;
+ my $ustva_vorauswahl = &ustva_vorauswahl();
+
+ my @all_years = $form->all_years(\%myconfig);
+
+ my $select_year = qq||;
+
+ my $_checked = '';
+ $_checked = "checked" if ($form->{kz10} eq '1');
+ my $checkbox_kz_10 = qq||
+ . $locale->text('Amended Advance Turnover Tax Return');
+
+ $_checked = "checked" if ($form->{kz22} eq '1');
+ my $checkbox_kz_22 = qq||
+ . $locale->text('Receipts attached/extra');
+
+ $_checked = "checked" if ($form->{kz29} eq '1');
+ my $checkbox_kz_29 = qq||
+ . $locale->text('Accounting desired');
+
+ $_checked = "checked" if ($form->{kz26} eq '1');
+ my $checkbox_kz_26 = qq||
+ . $locale->text('Direct debit revoked');
+
+ my $method_local = ($form->{accounting_method} eq 'accrual') ? $locale->text('accrual')
+ : ($form->{accounting_method} eq 'cash') ? $locale->text('cash')
+ : '';
+
+ my $period_local = ( $form->{fa_voranmeld} eq 'month') ? $locale->text('month')
+ : ( $form->{fa_voranmeld} eq 'quarter') ? $locale->text('quarter')
+ : '';
+
+ my @tax_office_banks_ref = (
+ { BLZ => $form->{fa_blz_1},
+ Kontonummer => $form->{fa_kontonummer_1},
+ Bankbezeichnung => $form->{fa_bankbezeichnung_1}
+ },
+ { BLZ => $form->{fa_blz_2},
+ Kontonummer => $form->{fa_kontonummer_2},
+ Bankbezeichnung => $form->{fa_bankbezeichnung_2}
+ }
+ );
+
+ $ustva->get_coa($form); # fetches coa and modifies some form variables
+
+ my $template_ref = {
+ openings => $openings,
+ company_given => $company_given,
+ address_given => $address_given,
+ taxnumber_given => $taxnumber_given,
+ fa_name_given => $fa_name_given,
+ taxnumber => $defaults->taxnumber,
+ select_year => $select_year,
+ period_local => $period_local,
+ method_local => $method_local,
+ ustva_vorauswahl => $ustva_vorauswahl,
+ checkbox_kz_10 => $checkbox_kz_10,
+ checkbox_kz_22 => $checkbox_kz_22,
+ checkbox_kz_29 => $checkbox_kz_29,
+ checkbox_kz_26 => $checkbox_kz_26,
+ tax_office_banks => \@tax_office_banks_ref,
+ geierlein_enabled => $geierlein_enabled,
+ geierlein_path => $geierlein_path,
+ select_options => &show_options,
+ };
- print qq|
- |
-
- |;
- #}# end if report = ustva
-
-
-
- print qq|
-