Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ccd0b365

Von Udo Spallek vor mehr als 17 Jahren hinzugefügt

  • ID ccd0b365250f57021a756203f65a4d153709b45d
  • Vorgänger a6e40ee8
  • Nachfolger 2d25fd5e

Generischer USTVA Report für alle Kontenrahmen ausser Germany

Unterschiede anzeigen:

SL/USTVA.pm
25 25

  
26 26
package USTVA;
27 27

  
28
use SL::DBUtils;
29

  
30
sub get_coa {
31
  
32
  my ( $self, $form, $myconfig) = @_;
33
  
34
  my $query = q{ SELECT coa FROM defaults };
35
  
36
  my $dbh = $form->dbconnect($myconfig);
37
  my $sth = $dbh->prepare($query);
38
  $sth->execute() || $form->dberror($query);
39

  
40
  my ($coa) = selectrow_query($form, $dbh, $query);  
41
  
42
  $sth->finish;
43
  $dbh->disconnect;
44
  
45
  $form->{coa} = $coa;
46
  $form->{"COA_$coa"} = '1';
47
  $form->{COA_Germany} = '1' if ( $coa eq 'Germany-DATEV-SKR03EU' or $coa eq 'Germany-DATEV-SKR04EU');
48

  
49
  return;
50
}
51

  
52

  
28 53
sub report_variables {
29 54
  # Get all positions for taxreport out of the database
30 55
  # Needs Databaseupdate Pg-upgrade2/USTVA_abstraction.pl
......
53 78
    $where_dcp  
54 79
  |;
55 80
  
56
  $main::lxdebug->message(LXDebug::QUERY, "\$query= \n $query\n");
57
  
58 81
  my $dbh = $form->dbconnect($myconfig);
59 82
  my $sth = $dbh->prepare($query);
60 83

  
bin/mozilla/ustva.pl
197 197
    }
198 198
  ];
199 199
 
200
  # Which COA is in use? 
200 201
  
202
  USTVA->get_coa($form, $myconfig);
203

  
201 204
  my $template_ref = {
202 205
    openings         => $openings,  
203 206
    company_given    => $company_given,
204 207
    address_given    => $address_given,     
205 208
    taxnumber_given  => $taxnumber_given,
209
    taxnumber        => $myconfig->{taxnumber},
206 210
    select_year      => $select_year,      
207 211
    period_local     => $period_local,
208 212
    method_local     => $method_local,
......
210 214
    checkbox_kz_10   => $checkbox_kz_10,
211 215
    tax_office_banks => $tax_office_banks_ref,    
212 216
    select_options   => &show_options,    
217

  
213 218
  };
214 219
  
215 220
  print($form->parse_html_template('ustva/report', $template_ref));
......
1005 1010
      exit(0);
1006 1011
    }
1007 1012

  
1008
  # Austria
1009
  } elsif ($form->{coa} eq 'Austria') {
1010

  
1011
    #
1012
    # Outputformat specific customisation's
1013
    #
1013
  
1014
  } else  # Outputformat for generic output
1015
  {
1014 1016

  
1015
    my @category_euro = qw(
1016
      511 861 36   80   971  931  98   96   53   74
1017
      85  65  66   61   62   67   63   64   59   69 
1018
      39  83  811  891  Z43  Z45  Z53  Z62  Z65  Z67
1019
      41 44 49 43 48 51 86 35 77 76 91 89
1020
      97 93 95 94 42 60 45 52 73 84 81 
1021
    );
1022
    
1017
    my @category_cent = USTVA->report_variables({
1018
        myconfig    => \%myconfig,
1019
        form        => $form,
1020
        type        => '',
1021
        attribute   => 'position',
1022
        dec_places  => '2',
1023
    });
1023 1024

  
1024
    if ( $form->{format} eq 'html') { # Formatierungen f?r HTML Ausgabe
1025
    my @category_euro = USTVA->report_variables({
1026
        myconfig    => \%myconfig,
1027
        form        => $form,
1028
        type        => '',
1029
        attribute   => 'position',
1030
        dec_places  => '0',
1031
    });
1025 1032

  
1026
      $form->{IN} = $form->{type} . '.html';
1027
      $form->{padding} = "  ";
1028
      $form->{bold}    = "<b>";
1029
      $form->{endbold} = "</b>";
1030
      $form->{br}      = "<br>";
1031
      $form->{address} =~ s/\\n/\n/g;
1033
    $form->{"Watchdog::USTVA"} = 1;
1034
    $form->{USTVA} = [];
1032 1035

  
1033
      foreach $number (@category_euro) {
1034
        $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '2', '0');
1036
    if ( $form->{format} eq 'generic') { # Formatierungen f?r HTML Ausgabe
1037
      
1038
      my $rec_ref = {};
1039
      for my $kennziffer (@category_cent, @category_euro) {
1040
        $rec_ref = {};
1041
        $rec_ref->{id} = $kennziffer;
1042
        $rec_ref->{amount} = $form->format_amount(\%myconfig, $form->{$kennziffer}, 2, '0');
1043
        
1044
        $lxdebug->message($LXDebug::DEBUG, "Kennziffer $kennziffer: '$form->{$kennziffer}'" );
1045
        $lxdebug->dump($LXDebug::DEBUG, $rec_ref );
1046
        push @ { $form->{USTVA} }, $rec_ref;
1035 1047
      }
1048
      
1036 1049
    }
1037
    
1038
  }
1039 1050

  
1040
  # end nation specific customisations
1051
  }
1041 1052
  
1042 1053
  if ( $form->{period} eq '13' and $form->{format} ne 'html') {
1043 1054
    $form->header;
......
1050 1061
  $form->{templates} = $myconfig{templates};
1051 1062
  $form->{templates} = "doc" if ( $form->{type} eq 'help' );
1052 1063

  
1053
  $form->parse_template(\%myconfig, $userspath);
1064
  if ($form->{format} eq 'generic'){
1065

  
1066
    $form->header();
1067

  
1068
    $template_ref = {
1069
        taxnumber => $myconfig{taxnumber},
1070
    };
1071

  
1072
    print($form->parse_html_template2('ustva/generic_taxreport', $template_ref));
1073

  
1074
  } else
1075
  { 
1076

  
1077
    $form->parse_template(\%myconfig, $userspath);
1078

  
1079
  }
1054 1080

  
1055 1081
  $lxdebug->leave_sub();
1056 1082
}
......
1115 1141
        { 'variable' => $variable, 'value' => $form->{$variable} };
1116 1142
  }
1117 1143

  
1144
# Which COA is in use? 
1145
  
1146
  USTVA->get_coa($form, \%myconfig);
1147

  
1118 1148
  # h?? kann die weg?
1119 1149
  my $steuernummer_new = '';
1120 1150

  
......
1257 1287
    saved                   callback
1258 1288
  );
1259 1289

  
1260

  
1261

  
1262 1290
  foreach my $variable (@_hidden_form_variables) {
1263 1291
    push @{ $_hidden_variables_ref}, 
1264 1292
        { 'variable' => $variable, 'value' => $form->{$variable} };
locale/de/all
527 527
  'From'                        => 'Von',
528 528
  'GL Transaction'              => 'Dialogbuchung',
529 529
  'General Ledger'              => 'Finanzbuchhaltung',
530
  'Generic Tax Report'          => 'USTVA Bericht',
530 531
  'Given Name'                  => 'Vorname',
531 532
  'Greeting'                    => 'Anrede',
532 533
  'Group'                       => 'Warengruppe',
......
543 544
  'Help'                        => 'Hilfe',
544 545
  'Here\'s an example command line:' => 'Hier ist eine Kommandozeile, die als Beispiel dient:',
545 546
  'Hide by default'             => 'Standardm&auml;&szlig;ig verstecken',
546
  'Hint-Missing-Preferences'    => 'Bitte fehlende USTVA Einstellungen erg?nzen (Men?punkt: System-> UStVA Einstellungen)',
547
  'Hints'                       => 'Hinweise',
548 547
  'History'                     => 'Historie',
549 548
  'History Search'              => 'Historien Suche',
550 549
  'History Search Engine'       => 'Historien Suchmaschine',
......
710 709
  'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.',
711 710
  'Missing \'tag\' field.'      => 'Fehlendes Feld \'tag\'.',
712 711
  'Missing Method!'             => 'Fehlender Voranmeldungszeitraum',
713
  'Missing Preferences: Outputroutine disabled' => 'Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!',
714 712
  'Missing Tax Authoritys Preferences' => 'Fehlende Angaben zum Finanzamt!',
715 713
  'Missing amount'              => 'Fehlbetrag',
716 714
  'Mitarbeiter'                 => 'Mitarbeiter',
......
851 849
  'Please enter a license key.' => 'Bitte geben Sie einen Lizenzschl?ssel an.',
852 850
  'Please enter a number of licenses.' => 'Bitte geben Sie die Anzahl Lizenzschl?ssel an.',
853 851
  '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.',
852
  'Please enter the taxnumber in the administration menu userpreferences' => 'Bitte bei den Einstellungen des aktuellen Benutzers im Administrationsmodul
853
  angeben.',
854 854
  'Please enter values'         => 'Bitte Werte eingeben',
855 855
  'Please insert object dimensions below.' => 'Bitte geben Sie die Abmessungen unten ein',
856 856
  'Please insert your language values below' => 'Bitte die ?bersetzungen unten eintragen',
......
1079 1079
  'Tax Percent is a number between 0 and 100' => 'Prozentsatz muss zwischen
1080 1080
  1% und 100% liegen',
1081 1081
  'Tax Period'                  => 'Voranmeldungszeitraum',
1082
  'Tax Position'                => 'Position',
1082 1083
  'Tax collected'               => 'vereinnahmte Steuer',
1083 1084
  'Tax deleted!'                => 'Steuer gel?scht!',
1084 1085
  'Tax number'                  => 'Steuernummer',
......
1096 1097
  'Taxkey_coa'                  => 'Steuerschl?ssel',
1097 1098
  'Taxkeys and Taxreport Preferences' => 'Steuerautomatik und UStVA',
1098 1099
  'Taxlink_coa'                 => 'Steuerautomatik',
1100
  'Taxnumber'                   => 'Steuernummer',
1099 1101
  'Taxrate missing!'            => 'Prozentsatz fehlt!',
1100 1102
  'Tel'                         => 'Tel',
1101 1103
  'Tel.'                        => 'Telefon',
templates/webpages/ustva/config_step1_de.html
11 11
    <tr>
12 12
     <td>
13 13
       <br />
14
<TMPL_IF COA_Germany>
14 15
       <fieldset>
15 16
       <legend><b>Angaben zum Finanzamt</b></legend>
16 17
       <br />
17 18
       <TMPL_VAR select_tax_office>
18 19
       </fieldset>
19 20
       <br />
20
       
21
</TMPL_IF>
21 22
       <fieldset>
22 23
       <legend><b>Versteuerungs Verfahren</b>
23 24
       </legend>
templates/webpages/ustva/config_step1_master.html
11 11
    <tr>
12 12
     <td>
13 13
       <br />
14
<TMPL_IF COA_Germany>
14 15
       <fieldset>
15 16
       <legend><b><translate>Local Tax Office Preferences</translate></b></legend>
16 17
       <br />
17 18
       <TMPL_VAR select_tax_office>
18 19
       </fieldset>
19 20
       <br />
20
       
21
</TMPL_IF>
21 22
       <fieldset>
22 23
       <legend><b><translate>Taxation</translate></b>
23 24
       </legend>
templates/webpages/ustva/config_step2_de.html
155 155
           <font size="+1">Steuernummer</font>
156 156
           </legend>
157 157
           <br>
158
<TMPL_IF COA_Germany>
158 159
           <TMPL_VAR input_steuernummer>
160
<TMPL_ELSE>
161
Bitte bei den Einstellungen des aktuellen Benutzers im Administrationsmodul
162
  angeben.
163
</TMPL_IF>
164

  
165

  
159 166
           </H2><br>
160 167
           </fieldset>
161 168
           <br>
templates/webpages/ustva/config_step2_master.html
155 155
           <font size="+1"><translate>Tax Number</translate></font>
156 156
           </legend>
157 157
           <br>
158
<TMPL_IF COA_Germany>
158 159
           <TMPL_VAR input_steuernummer>
160
<TMPL_ELSE>
161
<translate>Please enter the taxnumber in the administration menu user
162
preferences</translate>
163
</TMPL_IF>
164

  
165

  
159 166
           </H2><br>
160 167
           </fieldset>
161 168
           <br>
templates/webpages/ustva/generic_taxreport_de.html
1
[% USE HTML %]<body>
2

  
3
<h1>USTVA Bericht</h1>
4
<p>Steuernummer: [% taxnumber %]</p>
5
<p>Jahr: [% year %]</p>
6
<p>Zeitraum: [% period %]</p>
7
<br />
8
<table width="33%">
9
  <tr>
10
    <th>Position</th>
11
    <th>Betrag</th>
12
  </tr>
13
[% SET row_odd = '1' %]
14
[% FOREACH row = USTVA %]
15
  <tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[%
16
SET row_odd = '1' %][% END %]">
17

  
18
    <td align="left">[% HTML.escape(row.id) %]</td>
19
    <td align="right">[% HTML.escape(row.amount) %]</td>
20
  </tr>
21
[% END %]
22

  
23
</table>
24

  
25
</html>
26
</body>
templates/webpages/ustva/generic_taxreport_master.html
1
[% USE HTML %]<body>
2

  
3
<h1><translate>Generic Tax Report</translate></h1>
4
<p><translate>Taxnumber</translate>: [% taxnumber %]</p>
5
<p><translate>Year</translate>: [% year %]</p>
6
<p><translate>Period</translate>: [% period %]</p>
7
<br />
8
<table width="33%">
9
  <tr>
10
    <th><translate>Tax Position</translate></th>
11
    <th><translate>Amount</translate></th>
12
  </tr>
13
[% SET row_odd = '1' %]
14
[% FOREACH row = USTVA %]
15
  <tr class="listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[%
16
SET row_odd = '1' %][% END %]">
17

  
18
    <td align="left">[% HTML.escape(row.id) %]</td>
19
    <td align="right">[% HTML.escape(row.amount) %]</td>
20
  </tr>
21
[% END %]
22

  
23
</table>
24

  
25
</html>
26
</body>
templates/webpages/ustva/report_de.html
37 37
            <TMPL_VAR co_email ESCAPE=HTML>
38 38
            <br />
39 39
            <br />
40

  
40 41
            Steuernummer:&nbsp;
42
<TMPL_IF COA_Germany>
41 43
            <TMPL_VAR taxnumber_given>
42 44
            <br />
43 45
            ELSTER-Steuernummer:&nbsp;
44 46
            <TMPL_VAR elstersteuernummer ESCAPE=HTML>
45 47
            <br />
46 48
            <br />
47

  
49
<TMPL_ELSE>
50
            <TMPL_VAR taxnumber>
51
</TMPL_IF>
48 52
            </fieldset>
49 53
            <br />
50 54
            
......
52 56
              <fieldset>
53 57
              <legend>
54 58
                <input checked="checked" 
55
                 title = "Beraterdaten in UStVA ?bernehmen?"
56
                 name = "FA_steuerberater" 
57
                 id = "steuerberater" 
58
                 class = "checkbox" 
59
                 type = "checkbox"
60
                 value = "1" >
59
                 title="Beraterdaten in UStVA ?bernehmen?"
60
                 name="FA_steuerberater" 
61
                 id="steuerberater" 
62
                 class="checkbox" 
63
                 type="checkbox"
64
                 value="1" >
61 65
                 &nbsp;<b>Steuerberater/-in</b>
62 66
                </legend>
63 67
                
......
91 95
            </fieldset>
92 96
          </td>
93 97
          <td width="50%" valign="top">	  
94

  
95
<!--            TMPL_IF FA_Name                   -->
96

  
97 98
              <fieldset>
98 99
              <legend>
99 100
                 <b>Finanzamt</b>
......
160 161
              <legend>
161 162
              <b>Ausgabeformat</b>
162 163
              </legend>
164
<TMPL_IF COA_Germany>
163 165
              <TMPL_VAR select_options>
164
              </fieldset>
165
              
166
            <TMPL_ELSE>
166
<TMPL_ELSE>
167
              <SELECT name="format">
168
                <option value="generic">Druckvorschau</option>
169
              </SELECT>
170
</TMPL_if>
167 171

  
168
              <td width="50%" valign="bottom">
169
              <fieldset>
170
              <legend>
171
              <b>Hinweise</b>
172
              </legend>
173
              <h2 class="confirm">
174
              Die Ausgabefunktionen sind wegen unzureichender Voreinstellungen deaktiviert!
175
              </h2>
176
              <h3>Hilfe</h3>
177
              <ul>
178
              <li>Bitte fehlende USTVA Einstellungen erg?nzen (Men?punkt: System-> UStVA Einstellungen)</li>
179
              </ul>
180 172
              </fieldset>
181

  
182
            </TMPL_IF>
183 173
          </td>
184 174
        </tr>
185 175
      </table>
templates/webpages/ustva/report_master.html
37 37
            <TMPL_VAR co_email ESCAPE=HTML>
38 38
            <br />
39 39
            <br />
40

  
40 41
            <translate>Tax Number</translate>:&nbsp;
42
<TMPL_IF COA_Germany>
41 43
            <TMPL_VAR taxnumber_given>
42 44
            <br />
43 45
            <translate>ELSTER Tax Number</translate>:&nbsp;
44 46
            <TMPL_VAR elstersteuernummer ESCAPE=HTML>
45 47
            <br />
46 48
            <br />
47

  
49
<TMPL_ELSE>
50
            <TMPL_VAR taxnumber>
51
</TMPL_IF>
48 52
            </fieldset>
49 53
            <br />
50 54
            
......
52 56
              <fieldset>
53 57
              <legend>
54 58
                <input checked="checked" 
55
                 title = "<translate>Assume Tax Consultant Data in Tax Computation?</translate>"
56
                 name = "FA_steuerberater" 
57
                 id = "steuerberater" 
58
                 class = "checkbox" 
59
                 type = "checkbox"
60
                 value = "1" >
59
                 title="<translate>Assume Tax Consultant Data in Tax Computation?</translate>"
60
                 name="FA_steuerberater" 
61
                 id="steuerberater" 
62
                 class="checkbox" 
63
                 type="checkbox"
64
                 value="1" >
61 65
                 &nbsp;<b><translate>Tax Consultant</translate></b>
62 66
                </legend>
63 67
                
......
91 95
            </fieldset>
92 96
          </td>
93 97
          <td width="50%" valign="top">	  
94

  
95
<!--            TMPL_IF FA_Name                   -->
96

  
97 98
              <fieldset>
98 99
              <legend>
99 100
                 <b><translate>Tax Office</translate></b>
......
160 161
              <legend>
161 162
              <b><translate>Outputformat</translate></b>
162 163
              </legend>
164
<TMPL_IF COA_Germany>
163 165
              <TMPL_VAR select_options>
164
              </fieldset>
165
              
166
            <TMPL_ELSE>
166
<TMPL_ELSE>
167
              <SELECT name="format">
168
                <option value="generic"><translate>Preview</translate></option>
169
              </SELECT>
170
</TMPL_if>
167 171

  
168
              <td width="50%" valign="bottom">
169
              <fieldset>
170
              <legend>
171
              <b><translate>Hints</translate></b>
172
              </legend>
173
              <h2 class="confirm">
174
              <translate>Missing Preferences: Outputroutine
175
                 disabled</translate>
176
              </h2>
177
              <h3><translate>Help</translate></h3>
178
              <ul>
179
              <li><translate>Hint-Missing-Preferences</translate></li>
180
              </ul>
181 172
              </fieldset>
182

  
183
            </TMPL_IF>
184 173
          </td>
185 174
        </tr>
186 175
      </table>

Auch abrufbar als: Unified diff