Revision ccd0b365
Von Udo Spallek vor mehr als 17 Jahren hinzugefügt
SL/USTVA.pm | ||
---|---|---|
|
||
package USTVA;
|
||
|
||
use SL::DBUtils;
|
||
|
||
sub get_coa {
|
||
|
||
my ( $self, $form, $myconfig) = @_;
|
||
|
||
my $query = q{ SELECT coa FROM defaults };
|
||
|
||
my $dbh = $form->dbconnect($myconfig);
|
||
my $sth = $dbh->prepare($query);
|
||
$sth->execute() || $form->dberror($query);
|
||
|
||
my ($coa) = selectrow_query($form, $dbh, $query);
|
||
|
||
$sth->finish;
|
||
$dbh->disconnect;
|
||
|
||
$form->{coa} = $coa;
|
||
$form->{"COA_$coa"} = '1';
|
||
$form->{COA_Germany} = '1' if ( $coa eq 'Germany-DATEV-SKR03EU' or $coa eq 'Germany-DATEV-SKR04EU');
|
||
|
||
return;
|
||
}
|
||
|
||
|
||
sub report_variables {
|
||
# Get all positions for taxreport out of the database
|
||
# Needs Databaseupdate Pg-upgrade2/USTVA_abstraction.pl
|
||
... | ... | |
$where_dcp
|
||
|;
|
||
|
||
$main::lxdebug->message(LXDebug::QUERY, "\$query= \n $query\n");
|
||
|
||
my $dbh = $form->dbconnect($myconfig);
|
||
my $sth = $dbh->prepare($query);
|
||
|
bin/mozilla/ustva.pl | ||
---|---|---|
}
|
||
];
|
||
|
||
# Which COA is in use?
|
||
|
||
USTVA->get_coa($form, $myconfig);
|
||
|
||
my $template_ref = {
|
||
openings => $openings,
|
||
company_given => $company_given,
|
||
address_given => $address_given,
|
||
taxnumber_given => $taxnumber_given,
|
||
taxnumber => $myconfig->{taxnumber},
|
||
select_year => $select_year,
|
||
period_local => $period_local,
|
||
method_local => $method_local,
|
||
... | ... | |
checkbox_kz_10 => $checkbox_kz_10,
|
||
tax_office_banks => $tax_office_banks_ref,
|
||
select_options => &show_options,
|
||
|
||
};
|
||
|
||
print($form->parse_html_template('ustva/report', $template_ref));
|
||
... | ... | |
exit(0);
|
||
}
|
||
|
||
# Austria
|
||
} elsif ($form->{coa} eq 'Austria') {
|
||
|
||
#
|
||
# Outputformat specific customisation's
|
||
#
|
||
|
||
} else # Outputformat for generic output
|
||
{
|
||
|
||
my @category_euro = qw(
|
||
511 861 36 80 971 931 98 96 53 74
|
||
85 65 66 61 62 67 63 64 59 69
|
||
39 83 811 891 Z43 Z45 Z53 Z62 Z65 Z67
|
||
41 44 49 43 48 51 86 35 77 76 91 89
|
||
97 93 95 94 42 60 45 52 73 84 81
|
||
);
|
||
|
||
my @category_cent = USTVA->report_variables({
|
||
myconfig => \%myconfig,
|
||
form => $form,
|
||
type => '',
|
||
attribute => 'position',
|
||
dec_places => '2',
|
||
});
|
||
|
||
if ( $form->{format} eq 'html') { # Formatierungen f?r HTML Ausgabe
|
||
my @category_euro = USTVA->report_variables({
|
||
myconfig => \%myconfig,
|
||
form => $form,
|
||
type => '',
|
||
attribute => 'position',
|
||
dec_places => '0',
|
||
});
|
||
|
||
$form->{IN} = $form->{type} . '.html';
|
||
$form->{padding} = " ";
|
||
$form->{bold} = "<b>";
|
||
$form->{endbold} = "</b>";
|
||
$form->{br} = "<br>";
|
||
$form->{address} =~ s/\\n/\n/g;
|
||
$form->{"Watchdog::USTVA"} = 1;
|
||
$form->{USTVA} = [];
|
||
|
||
foreach $number (@category_euro) {
|
||
$form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '2', '0');
|
||
if ( $form->{format} eq 'generic') { # Formatierungen f?r HTML Ausgabe
|
||
|
||
my $rec_ref = {};
|
||
for my $kennziffer (@category_cent, @category_euro) {
|
||
$rec_ref = {};
|
||
$rec_ref->{id} = $kennziffer;
|
||
$rec_ref->{amount} = $form->format_amount(\%myconfig, $form->{$kennziffer}, 2, '0');
|
||
|
||
$lxdebug->message($LXDebug::DEBUG, "Kennziffer $kennziffer: '$form->{$kennziffer}'" );
|
||
$lxdebug->dump($LXDebug::DEBUG, $rec_ref );
|
||
push @ { $form->{USTVA} }, $rec_ref;
|
||
}
|
||
|
||
}
|
||
|
||
}
|
||
|
||
# end nation specific customisations
|
||
}
|
||
|
||
if ( $form->{period} eq '13' and $form->{format} ne 'html') {
|
||
$form->header;
|
||
... | ... | |
$form->{templates} = $myconfig{templates};
|
||
$form->{templates} = "doc" if ( $form->{type} eq 'help' );
|
||
|
||
$form->parse_template(\%myconfig, $userspath);
|
||
if ($form->{format} eq 'generic'){
|
||
|
||
$form->header();
|
||
|
||
$template_ref = {
|
||
taxnumber => $myconfig{taxnumber},
|
||
};
|
||
|
||
print($form->parse_html_template2('ustva/generic_taxreport', $template_ref));
|
||
|
||
} else
|
||
{
|
||
|
||
$form->parse_template(\%myconfig, $userspath);
|
||
|
||
}
|
||
|
||
$lxdebug->leave_sub();
|
||
}
|
||
... | ... | |
{ 'variable' => $variable, 'value' => $form->{$variable} };
|
||
}
|
||
|
||
# Which COA is in use?
|
||
|
||
USTVA->get_coa($form, \%myconfig);
|
||
|
||
# h?? kann die weg?
|
||
my $steuernummer_new = '';
|
||
|
||
... | ... | |
saved callback
|
||
);
|
||
|
||
|
||
|
||
foreach my $variable (@_hidden_form_variables) {
|
||
push @{ $_hidden_variables_ref},
|
||
{ 'variable' => $variable, 'value' => $form->{$variable} };
|
locale/de/all | ||
---|---|---|
'From' => 'Von',
|
||
'GL Transaction' => 'Dialogbuchung',
|
||
'General Ledger' => 'Finanzbuchhaltung',
|
||
'Generic Tax Report' => 'USTVA Bericht',
|
||
'Given Name' => 'Vorname',
|
||
'Greeting' => 'Anrede',
|
||
'Group' => 'Warengruppe',
|
||
... | ... | |
'Help' => 'Hilfe',
|
||
'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:',
|
||
'Hide by default' => 'Standardmäßig verstecken',
|
||
'Hint-Missing-Preferences' => 'Bitte fehlende USTVA Einstellungen erg?nzen (Men?punkt: System-> UStVA Einstellungen)',
|
||
'Hints' => 'Hinweise',
|
||
'History' => 'Historie',
|
||
'History Search' => 'Historien Suche',
|
||
'History Search Engine' => 'Historien Suchmaschine',
|
||
... | ... | |
'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
|
||
'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.',
|
||
'Missing Method!' => 'Fehlender Voranmeldungszeitraum',
|
||
'Missing Preferences: Outputroutine disabled' => 'Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!',
|
||
'Missing Tax Authoritys Preferences' => 'Fehlende Angaben zum Finanzamt!',
|
||
'Missing amount' => 'Fehlbetrag',
|
||
'Mitarbeiter' => 'Mitarbeiter',
|
||
... | ... | |
'Please enter a license key.' => 'Bitte geben Sie einen Lizenzschl?ssel an.',
|
||
'Please enter a number of licenses.' => 'Bitte geben Sie die Anzahl Lizenzschl?ssel an.',
|
||
'Please enter the name of the dataset you want to restore the backup in.' => 'Bitte geben Sie den Namen der Datenbank ein, in der Sie die Sicherung wiederherstellen wollen.',
|
||
'Please enter the taxnumber in the administration menu userpreferences' => 'Bitte bei den Einstellungen des aktuellen Benutzers im Administrationsmodul
|
||
angeben.',
|
||
'Please enter values' => 'Bitte Werte eingeben',
|
||
'Please insert object dimensions below.' => 'Bitte geben Sie die Abmessungen unten ein',
|
||
'Please insert your language values below' => 'Bitte die ?bersetzungen unten eintragen',
|
||
... | ... | |
'Tax Percent is a number between 0 and 100' => 'Prozentsatz muss zwischen
|
||
1% und 100% liegen',
|
||
'Tax Period' => 'Voranmeldungszeitraum',
|
||
'Tax Position' => 'Position',
|
||
'Tax collected' => 'vereinnahmte Steuer',
|
||
'Tax deleted!' => 'Steuer gel?scht!',
|
||
'Tax number' => 'Steuernummer',
|
||
... | ... | |
'Taxkey_coa' => 'Steuerschl?ssel',
|
||
'Taxkeys and Taxreport Preferences' => 'Steuerautomatik und UStVA',
|
||
'Taxlink_coa' => 'Steuerautomatik',
|
||
'Taxnumber' => 'Steuernummer',
|
||
'Taxrate missing!' => 'Prozentsatz fehlt!',
|
||
'Tel' => 'Tel',
|
||
'Tel.' => 'Telefon',
|
templates/webpages/ustva/config_step1_de.html | ||
---|---|---|
<tr>
|
||
<td>
|
||
<br />
|
||
<TMPL_IF COA_Germany>
|
||
<fieldset>
|
||
<legend><b>Angaben zum Finanzamt</b></legend>
|
||
<br />
|
||
<TMPL_VAR select_tax_office>
|
||
</fieldset>
|
||
<br />
|
||
|
||
</TMPL_IF>
|
||
<fieldset>
|
||
<legend><b>Versteuerungs Verfahren</b>
|
||
</legend>
|
templates/webpages/ustva/config_step1_master.html | ||
---|---|---|
<tr>
|
||
<td>
|
||
<br />
|
||
<TMPL_IF COA_Germany>
|
||
<fieldset>
|
||
<legend><b><translate>Local Tax Office Preferences</translate></b></legend>
|
||
<br />
|
||
<TMPL_VAR select_tax_office>
|
||
</fieldset>
|
||
<br />
|
||
|
||
</TMPL_IF>
|
||
<fieldset>
|
||
<legend><b><translate>Taxation</translate></b>
|
||
</legend>
|
templates/webpages/ustva/config_step2_de.html | ||
---|---|---|
<font size="+1">Steuernummer</font>
|
||
</legend>
|
||
<br>
|
||
<TMPL_IF COA_Germany>
|
||
<TMPL_VAR input_steuernummer>
|
||
<TMPL_ELSE>
|
||
Bitte bei den Einstellungen des aktuellen Benutzers im Administrationsmodul
|
||
angeben.
|
||
</TMPL_IF>
|
||
|
||
|
||
</H2><br>
|
||
</fieldset>
|
||
<br>
|
templates/webpages/ustva/config_step2_master.html | ||
---|---|---|
<font size="+1"><translate>Tax Number</translate></font>
|
||
</legend>
|
||
<br>
|
||
<TMPL_IF COA_Germany>
|
||
<TMPL_VAR input_steuernummer>
|
||
<TMPL_ELSE>
|
||
<translate>Please enter the taxnumber in the administration menu user
|
||
preferences</translate>
|
||
</TMPL_IF>
|
||
|
||
|
||
</H2><br>
|
||
</fieldset>
|
||
<br>
|
templates/webpages/ustva/generic_taxreport_de.html | ||
---|---|---|
[% USE HTML %]<body>
|
||
|
||
<h1>USTVA Bericht</h1>
|
||
<p>Steuernummer: [% taxnumber %]</p>
|
||
<p>Jahr: [% year %]</p>
|
||
<p>Zeitraum: [% period %]</p>
|
||
<br />
|
||
<table width="33%">
|
||
<tr>
|
||
<th>Position</th>
|
||
<th>Betrag</th>
|
||
</tr>
|
||
[% SET row_odd = '1' %]
|
||
[% FOREACH row = USTVA %]
|
||
<tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[%
|
||
SET row_odd = '1' %][% END %]">
|
||
|
||
<td align="left">[% HTML.escape(row.id) %]</td>
|
||
<td align="right">[% HTML.escape(row.amount) %]</td>
|
||
</tr>
|
||
[% END %]
|
||
|
||
</table>
|
||
|
||
</html>
|
||
</body>
|
templates/webpages/ustva/generic_taxreport_master.html | ||
---|---|---|
[% USE HTML %]<body>
|
||
|
||
<h1><translate>Generic Tax Report</translate></h1>
|
||
<p><translate>Taxnumber</translate>: [% taxnumber %]</p>
|
||
<p><translate>Year</translate>: [% year %]</p>
|
||
<p><translate>Period</translate>: [% period %]</p>
|
||
<br />
|
||
<table width="33%">
|
||
<tr>
|
||
<th><translate>Tax Position</translate></th>
|
||
<th><translate>Amount</translate></th>
|
||
</tr>
|
||
[% SET row_odd = '1' %]
|
||
[% FOREACH row = USTVA %]
|
||
<tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[%
|
||
SET row_odd = '1' %][% END %]">
|
||
|
||
<td align="left">[% HTML.escape(row.id) %]</td>
|
||
<td align="right">[% HTML.escape(row.amount) %]</td>
|
||
</tr>
|
||
[% END %]
|
||
|
||
</table>
|
||
|
||
</html>
|
||
</body>
|
templates/webpages/ustva/report_de.html | ||
---|---|---|
<TMPL_VAR co_email ESCAPE=HTML>
|
||
<br />
|
||
<br />
|
||
|
||
Steuernummer:
|
||
<TMPL_IF COA_Germany>
|
||
<TMPL_VAR taxnumber_given>
|
||
<br />
|
||
ELSTER-Steuernummer:
|
||
<TMPL_VAR elstersteuernummer ESCAPE=HTML>
|
||
<br />
|
||
<br />
|
||
|
||
<TMPL_ELSE>
|
||
<TMPL_VAR taxnumber>
|
||
</TMPL_IF>
|
||
</fieldset>
|
||
<br />
|
||
|
||
... | ... | |
<fieldset>
|
||
<legend>
|
||
<input checked="checked"
|
||
title = "Beraterdaten in UStVA ?bernehmen?"
|
||
name = "FA_steuerberater"
|
||
id = "steuerberater"
|
||
class = "checkbox"
|
||
type = "checkbox"
|
||
value = "1" >
|
||
title="Beraterdaten in UStVA ?bernehmen?"
|
||
name="FA_steuerberater"
|
||
id="steuerberater"
|
||
class="checkbox"
|
||
type="checkbox"
|
||
value="1" >
|
||
<b>Steuerberater/-in</b>
|
||
</legend>
|
||
|
||
... | ... | |
</fieldset>
|
||
</td>
|
||
<td width="50%" valign="top">
|
||
|
||
<!-- TMPL_IF FA_Name -->
|
||
|
||
<fieldset>
|
||
<legend>
|
||
<b>Finanzamt</b>
|
||
... | ... | |
<legend>
|
||
<b>Ausgabeformat</b>
|
||
</legend>
|
||
<TMPL_IF COA_Germany>
|
||
<TMPL_VAR select_options>
|
||
</fieldset>
|
||
|
||
<TMPL_ELSE>
|
||
<TMPL_ELSE>
|
||
<SELECT name="format">
|
||
<option value="generic">Druckvorschau</option>
|
||
</SELECT>
|
||
</TMPL_if>
|
||
|
||
<td width="50%" valign="bottom">
|
||
<fieldset>
|
||
<legend>
|
||
<b>Hinweise</b>
|
||
</legend>
|
||
<h2 class="confirm">
|
||
Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!
|
||
</h2>
|
||
<h3>Hilfe</h3>
|
||
<ul>
|
||
<li>Bitte fehlende USTVA Einstellungen erg?nzen (Men?punkt: System-> UStVA Einstellungen)</li>
|
||
</ul>
|
||
</fieldset>
|
||
|
||
</TMPL_IF>
|
||
</td>
|
||
</tr>
|
||
</table>
|
templates/webpages/ustva/report_master.html | ||
---|---|---|
<TMPL_VAR co_email ESCAPE=HTML>
|
||
<br />
|
||
<br />
|
||
|
||
<translate>Tax Number</translate>:
|
||
<TMPL_IF COA_Germany>
|
||
<TMPL_VAR taxnumber_given>
|
||
<br />
|
||
<translate>ELSTER Tax Number</translate>:
|
||
<TMPL_VAR elstersteuernummer ESCAPE=HTML>
|
||
<br />
|
||
<br />
|
||
|
||
<TMPL_ELSE>
|
||
<TMPL_VAR taxnumber>
|
||
</TMPL_IF>
|
||
</fieldset>
|
||
<br />
|
||
|
||
... | ... | |
<fieldset>
|
||
<legend>
|
||
<input checked="checked"
|
||
title = "<translate>Assume Tax Consultant Data in Tax Computation?</translate>"
|
||
name = "FA_steuerberater"
|
||
id = "steuerberater"
|
||
class = "checkbox"
|
||
type = "checkbox"
|
||
value = "1" >
|
||
title="<translate>Assume Tax Consultant Data in Tax Computation?</translate>"
|
||
name="FA_steuerberater"
|
||
id="steuerberater"
|
||
class="checkbox"
|
||
type="checkbox"
|
||
value="1" >
|
||
<b><translate>Tax Consultant</translate></b>
|
||
</legend>
|
||
|
||
... | ... | |
</fieldset>
|
||
</td>
|
||
<td width="50%" valign="top">
|
||
|
||
<!-- TMPL_IF FA_Name -->
|
||
|
||
<fieldset>
|
||
<legend>
|
||
<b><translate>Tax Office</translate></b>
|
||
... | ... | |
<legend>
|
||
<b><translate>Outputformat</translate></b>
|
||
</legend>
|
||
<TMPL_IF COA_Germany>
|
||
<TMPL_VAR select_options>
|
||
</fieldset>
|
||
|
||
<TMPL_ELSE>
|
||
<TMPL_ELSE>
|
||
<SELECT name="format">
|
||
<option value="generic"><translate>Preview</translate></option>
|
||
</SELECT>
|
||
</TMPL_if>
|
||
|
||
<td width="50%" valign="bottom">
|
||
<fieldset>
|
||
<legend>
|
||
<b><translate>Hints</translate></b>
|
||
</legend>
|
||
<h2 class="confirm">
|
||
<translate>Missing Preferences: Outputroutine
|
||
disabled</translate>
|
||
</h2>
|
||
<h3><translate>Help</translate></h3>
|
||
<ul>
|
||
<li><translate>Hint-Missing-Preferences</translate></li>
|
||
</ul>
|
||
</fieldset>
|
||
|
||
</TMPL_IF>
|
||
</td>
|
||
</tr>
|
||
</table>
|
Auch abrufbar als: Unified diff
Generischer USTVA Report für alle Kontenrahmen ausser Germany