Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0279167d

Von Sven Schöling vor mehr als 13 Jahren hinzugefügt

  • ID 0279167dadf940eceb6dfbb43f81bacdd80d58c3
  • Vorgänger e81efe40
  • Nachfolger 914c56f4

bin/mozilla/ustva.pl strict.

Unterschiede anzeigen:

bin/mozilla/ustva.pl
74 74
#############################
75 75

  
76 76
sub report {
77
  $lxdebug->enter_sub();
77
  $::lxdebug->enter_sub();
78 78

  
79
  $auth->assert('advance_turnover_tax_return');
79
  my $form     = $::form;
80
  my $locale   = $::locale;
81
  my %myconfig = %::myconfig;
80 82

  
81
  my $myconfig = \%myconfig;
83
  $::auth->assert('advance_turnover_tax_return');
82 84

  
83 85
  $form->{title} = $locale->text('UStVA');
84 86
  $form->{kz10}  = '';                       #Berichtigte Anmeldung? Ja =1 Nein=0
......
87 89
             0, 4);
88 90

  
89 91
  my $department = '';
90
  local $hide = '';
92
  my $hide = '';
91 93
  $form->header;
92 94

  
93 95
  # Einlesen der Finanzamtdaten
94 96
  my $ustva = USTVA->new();
95
  $ustva->get_config($userspath, 'finanzamt.ini');
97
  $ustva->get_config($::userspath, 'finanzamt.ini');
96 98

  
97 99
  # Hier Einlesen der user-config
98 100
  # steuernummer entfernt für prerelease
......
109 111
    co_accountnr3
110 112
  );
111 113

  
112
  map { $form->{$_} = $myconfig->{$_} } @a;
114
  map { $form->{$_} = $myconfig{$_} } @a;
113 115

  
114 116
  my $openings = $form->{FA_Oeffnungszeiten};
115 117
  $openings =~ s/\\\\n/<br>/g;
......
189 191

  
190 192
  # Which COA is in use?
191 193

  
192
  $ustva->get_coa($form, $myconfig);
194
  $ustva->get_coa($form, \%myconfig);
193 195

  
194 196
  my $template_ref = {
195 197
    openings         => $openings,
196 198
    company_given    => $company_given,
197 199
    address_given    => $address_given,
198 200
    taxnumber_given  => $taxnumber_given,
199
    taxnumber        => $myconfig->{taxnumber},
201
    taxnumber        => $myconfig{taxnumber},
200 202
    select_year      => $select_year,
201 203
    period_local     => $period_local,
202 204
    method_local     => $method_local,
......
211 213

  
212 214

  
213 215

  
214
  $lxdebug->leave_sub();
216
  $::lxdebug->leave_sub();
215 217
}
216 218

  
217 219

  
218 220

  
219 221
sub help {
220
  $lxdebug->enter_sub();
222
  $::lxdebug->enter_sub();
221 223

  
222
  $auth->assert('advance_turnover_tax_return');
224
  $::auth->assert('advance_turnover_tax_return');
223 225

  
224 226
  # parse help documents under doc
225
  my $tmp = $form->{templates};
226
  $form->{templates} = 'doc';
227
  $form->{help}      = 'ustva';
228
  $form->{type}      = 'help';
229
  $form->{format}    = 'html';
230
  &generate_ustva();
227
  my $tmp = $::form->{templates};
228
  $::form->{templates} = 'doc';
229
  $::form->{help}      = 'ustva';
230
  $::form->{type}      = 'help';
231
  $::form->{format}    = 'html';
232
  generate_ustva();
231 233

  
232 234
  #$form->{templates} = $tmp;
233
  $lxdebug->leave_sub();
235
  $::lxdebug->leave_sub();
234 236
}
235 237

  
236 238
sub show {
237
  $lxdebug->enter_sub();
239
  $::lxdebug->enter_sub();
238 240

  
239
  $auth->assert('advance_turnover_tax_return');
241
  $::auth->assert('advance_turnover_tax_return');
240 242

  
241 243
  #&generate_ustva();
242
  no strict 'refs';
243
  $lxdebug->leave_sub();
244
  call_sub($form->{"nextsub"});
245
  use strict 'refs';
244
  $::lxdebug->leave_sub();
245
  call_sub($::form->{"nextsub"});
246 246
}
247 247

  
248 248
sub ustva_vorauswahl {
249
  $lxdebug->enter_sub();
249
  $::lxdebug->enter_sub();
250 250

  
251
  $auth->assert('advance_turnover_tax_return');
251
  my $form     = $::form;
252
  my $locale   = $::locale;
253
  my %myconfig = %::myconfig;
254

  
255
  $::auth->assert('advance_turnover_tax_return');
252 256

  
253 257
  my $select_vorauswahl;
254 258

  
......
259 263
  $form->{day}   = substr($date, 6, 2);
260 264
  $form->{month} = substr($date, 4, 2);
261 265
  $form->{year}  = substr($date, 0, 4);
262
  $lxdebug->message(LXDebug::DEBUG1, qq|
266
  $::lxdebug->message(LXDebug->DEBUG1, qq|
263 267
    Actual date from Database: $date\n
264 268
    Actual year from Database: $form->{year}\n
265 269
    Actual day from Database: $form->{day}\n
......
466 470
    }
467 471
    $select_vorauswahl .= qq|</select>|;
468 472
  }
469
  $lxdebug->leave_sub();
473
  $::lxdebug->leave_sub();
470 474

  
471 475
  return $select_vorauswahl;
472 476
}
473 477

  
474 478
#sub config {
475
#  $lxdebug->enter_sub();
479
#  $::lxdebug->enter_sub();
476 480
#  config_step1();
477
#  $lxdebug->leave_sub();
481
#  $::lxdebug->leave_sub();
478 482
#}
479 483

  
480 484
sub debug {
481
  $lxdebug->enter_sub();
482
  $form->debug();
483
  $lxdebug->leave_sub();
485
  $::lxdebug->enter_sub();
486
  $::form->debug();
487
  $::lxdebug->leave_sub();
484 488
}
485 489

  
486 490
sub show_options {
487
  $lxdebug->enter_sub();
491
  $::lxdebug->enter_sub();
488 492

  
489
  $auth->assert('advance_turnover_tax_return');
493
  $::auth->assert('advance_turnover_tax_return');
490 494

  
491 495
  #  $form->{PD}{$form->{type}} = "selected";
492 496
  #  $form->{DF}{$form->{format}} = "selected";
......
496 500
  my $media  = qq|      <input type=hidden name="media" value="screen">|;
497 501
  my $format =
498 502
      qq|       <option value=html selected>|
499
    . $locale->text('Preview')
503
    . $::locale->text('Preview')
500 504
    . qq|</option>|;
501
  if ($latex_templates) {
505
  if ($::latex_templates) {
502 506
    $format .=
503 507
        qq|    <option value=pdf>|
504
      . $locale->text('UStVA (PDF-Dokument)')
508
      . $::locale->text('UStVA (PDF-Dokument)')
505 509
      . qq|</option>|;
506 510
  }
507 511

  
508 512
  #my $disabled= qq|disabled="disabled"|;
509 513
  #$disabled='' if ($form->{elster} eq '1' );
510
  if ($form->{elster} eq '1') {
514
  if ($::form->{elster} eq '1') {
511 515
    $format .=
512 516
        qq|<option value=elsterwinston>|
513
      . $locale->text('ELSTER Export (Winston)')
517
      . $::locale->text('ELSTER Export (Winston)')
514 518
      . qq|</option>|
515 519
      . qq|<option value=elstertaxbird>|
516
      . $locale->text('ELSTER Export (Taxbird)')
520
      . $::locale->text('ELSTER Export (Taxbird)')
517 521
      . qq|</option>|;
518 522
  }
519 523

  
......
522 526
    $type
523 527
    $media
524 528
    <select name=format title = "|
525
    . $locale->text('Choose Outputformat') . qq|">$format</select>
529
    . $::locale->text('Choose Outputformat') . qq|">$format</select>
526 530
  |;
527
  $lxdebug->leave_sub();
531
  $::lxdebug->leave_sub();
528 532

  
529 533
  return $show_options;
530 534
}
531 535

  
532 536
sub generate_ustva {
533
  $lxdebug->enter_sub();
537
  $::lxdebug->enter_sub();
538

  
539
  my $form     = $::form;
540
  my $locale   = $::locale;
541
  my %myconfig = %::myconfig;
534 542

  
535
  $auth->assert('advance_turnover_tax_return');
543
  $::auth->assert('advance_turnover_tax_return');
536 544

  
537 545
  # Aufruf von get_config zum Einlesen der Finanzamtdaten aus finanzamt.ini
538 546

  
539 547
  my $ustva = USTVA->new();
540
  $ustva->get_config($userspath, 'finanzamt.ini');
548
  $ustva->get_config($::userspath, 'finanzamt.ini');
541 549

  
542 550
  # init some form vars
543 551
  my @anmeldungszeitraum =
......
558 566
                                    $form->current_date(\%myconfig), \%myconfig
559 567
                             ),
560 568
                             0, 4);
561
      $lxdebug->message(LXDebug::DEBUG1,
569
      $::lxdebug->message(LXDebug->DEBUG1,
562 570
                        qq|Actual year from Database: $form->{year}\n|);
563 571
    }
564 572

  
......
691 699
  # if there are any dates construct a where
692 700
  if ($form->{fromdate} || $form->{todate}) {
693 701

  
694
    $form->{todate} = $form->current_date($myconfig)  unless ($form->{todate});
702
    $form->{todate} = $form->current_date(\%myconfig)  unless ($form->{todate});
695 703

  
696
    my $longtodate  = $locale->date($myconfig, $form->{todate}, 1, 0, 0);
697
    my $shorttodate = $locale->date($myconfig, $form->{todate}, 0, 0, 0);
704
    my $longtodate  = $locale->date(\%myconfig, $form->{todate}, 1, 0, 0);
705
    my $shorttodate = $locale->date(\%myconfig, $form->{todate}, 0, 0, 0);
698 706

  
699
    my $longfromdate  = $locale->date($myconfig, $form->{fromdate}, 1, 0, 0);
700
    my $shortfromdate = $locale->date($myconfig, $form->{fromdate}, 0, 0, 0);
707
    my $longfromdate  = $locale->date(\%myconfig, $form->{fromdate}, 1, 0, 0);
708
    my $shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0, 0, 0);
701 709

  
702 710
    $form->{this_period} = "$shortfromdate<br>\n$shorttodate";
703 711
    $form->{longperiod}      =
......
811 819
      $form->{br}      = "<br>";
812 820
      $form->{address} =~ s/\\n/\n/g;
813 821

  
814
      foreach $number (@category_cent) {
822
      foreach my $number (@category_cent) {
815 823
        $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '2', '0');
816 824
      }
817 825

  
818
      foreach $number (@category_euro) {
826
      foreach my $number (@category_euro) {
819 827
        $form->{$number} = $form->format_amount(\%myconfig, $form->{$number}, '0', '0');
820 828
      }
821 829

  
......
839 847
      #file suffix
840 848
      $file .= '.xml';
841 849
      $file =~ s|.*/||;
842
      $form->{tmpfile} = "$userspath/$file";
850
      $form->{tmpfile} = "$::userspath/$file";
843 851

  
844 852
      $form->{attachment_filename} = $file;
845 853

  
......
889 897
      . sprintf("%02d", $form->{year} % 100) . ".txb";
890 898

  
891 899
      $form->{attachment_filename} =~ s|.*/||;
892
      $form->{tmpfile} = "$userspath/" . $form->{attachment_filename};
900
      $form->{tmpfile} = "$::userspath/" . $form->{attachment_filename};
893 901

  
894 902
      # TODO: set Output to UTF-8 or system Preference
895 903
      #$form->{"iconv"} = Text::Iconv->new($myconfig{dbcharset}, "UTF-8");
......
909 917
      } elsif ($form->{period} =~ /^\d+$/ ) {
910 918
        $form->{period} =~ s/^0//g;
911 919
        my $period = $form->{period};
912
        $period * 1;
920
        $period *= 1;
913 921
        $period--;
914 922
        $form->{taxbird_period} = $period;
915 923
      } else {
......
1037 1045
        $rec_ref->{id} = $kennziffer;
1038 1046
        $rec_ref->{amount} = $form->format_amount(\%myconfig, $form->{$kennziffer}, 2, '0');
1039 1047

  
1040
        $lxdebug->message($LXDebug::DEBUG, "Kennziffer $kennziffer: '$form->{$kennziffer}'" );
1041
        $lxdebug->dump($LXDebug::DEBUG, $rec_ref );
1048
        $::lxdebug->message($LXDebug::DEBUG, "Kennziffer $kennziffer: '$form->{$kennziffer}'" );
1049
        $::lxdebug->dump($LXDebug::DEBUG, $rec_ref );
1042 1050
        push @ { $form->{USTVA} }, $rec_ref;
1043 1051
      }
1044 1052

  
......
1061 1069

  
1062 1070
    $form->header();
1063 1071

  
1064
    $template_ref = {
1072
    my $template_ref = {
1065 1073
        taxnumber => $myconfig{taxnumber},
1066 1074
    };
1067 1075

  
......
1070 1078
  } else
1071 1079
  {
1072 1080

  
1073
    $form->parse_template(\%myconfig, $userspath);
1081
    $form->parse_template(\%myconfig, $::userspath);
1074 1082

  
1075 1083
  }
1076 1084

  
1077
  $lxdebug->leave_sub();
1085
  $::lxdebug->leave_sub();
1078 1086
}
1079 1087

  
1080 1088
sub config_step1 {
1081
  $lxdebug->enter_sub();
1089
  $::lxdebug->enter_sub();
1082 1090

  
1083
  $auth->assert('advance_turnover_tax_return');
1091
  $::auth->assert('advance_turnover_tax_return');
1084 1092

  
1085
$form->{title} = $locale->text('Tax Office Preferences');
1093
$::form->{title} = $::locale->text('Tax Office Preferences');
1086 1094

  
1087 1095
  # edit all taxauthority prefs
1088 1096

  
1089
  $form->header;
1097
  $::form->header;
1090 1098

  
1091 1099
  my $ustva = USTVA->new();
1092
  $ustva->get_config($userspath, 'finanzamt.ini');
1100
  $ustva->get_config($::userspath, 'finanzamt.ini');
1093 1101

  
1094
  my $land = $form->{elsterland};
1095
  my $amt  = $form->{elsterFFFF};
1102
  my $land = $::form->{elsterland};
1103
  my $amt  = $::form->{elsterFFFF};
1096 1104

  
1097 1105

  
1098
  $form->{title} = $locale->text('Tax Office Preferences');
1106
  $::form->{title} = $::locale->text('Tax Office Preferences');
1099 1107

  
1100 1108

  
1101
  my $select_tax_office = $ustva->fa_auswahl($land, $amt, $ustva->query_finanzamt(\%myconfig, $form));
1102
  my $checked_accrual = q|checked="checked"| if ($form->{method} eq 'accrual');
1103
  my $checked_cash = q|checked="checked"| if ($form->{method} eq 'cash');
1104
  my $checked_monthly = "checked" if ($form->{FA_voranmeld} eq 'month');
1105
  my $checked_quarterly = "checked" if ($form->{FA_voranmeld} eq 'quarter');
1106
  my $checked_dauerfristverlaengerung = "checked" if ($form->{FA_dauerfrist} eq '1');
1107
  my $checked_kz_71 = "checked" if ($form->{FA_71} eq 'X');
1109
  my $select_tax_office = $ustva->fa_auswahl($land, $amt, $ustva->query_finanzamt(\%::myconfig, $::form));
1110
  my $checked_accrual = q|checked="checked"| if ($::form->{method} eq 'accrual');
1111
  my $checked_cash = q|checked="checked"| if ($::form->{method} eq 'cash');
1112
  my $checked_monthly = "checked" if ($::form->{FA_voranmeld} eq 'month');
1113
  my $checked_quarterly = "checked" if ($::form->{FA_voranmeld} eq 'quarter');
1114
  my $checked_dauerfristverlaengerung = "checked" if ($::form->{FA_dauerfrist} eq '1');
1115
  my $checked_kz_71 = "checked" if ($::form->{FA_71} eq 'X');
1108 1116

  
1109 1117
  my $_hidden_variables_ref;
1110 1118

  
1111 1119
  my %_hidden_local_variables = (
1112
    'saved'       => $locale->text('Check Details'),
1120
    'saved'       => $::locale->text('Check Details'),
1113 1121
    'nextsub'     => 'config_step2',
1114 1122
    'warnung'     => '0',
1115 1123
  );
......
1132 1140

  
1133 1141
  foreach my $variable (@_hidden_form_variables) {
1134 1142
    push @{ $_hidden_variables_ref},
1135
        { 'variable' => $variable, 'value' => $form->{$variable} };
1143
        { 'variable' => $variable, 'value' => $::form->{$variable} };
1136 1144
  }
1137 1145

  
1138 1146
# Which COA is in use?
1139 1147

  
1140
  $ustva->get_coa($form, \%myconfig);
1148
  $ustva->get_coa($::form, \%::myconfig);
1141 1149

  
1142 1150
  # hä? kann die weg?
1143 1151
  my $steuernummer_new = '';
......
1155 1163
  };
1156 1164

  
1157 1165
  # Ausgabe des Templates
1158
  print($form->parse_html_template('ustva/config_step1', $template_ref));
1166
  print($::form->parse_html_template('ustva/config_step1', $template_ref));
1159 1167

  
1160
  $lxdebug->leave_sub();
1168
  $::lxdebug->leave_sub();
1161 1169
}
1162 1170

  
1163 1171
sub config_step2 {
1164
  $lxdebug->enter_sub();
1172
  $::lxdebug->enter_sub();
1173

  
1174
  my $form     = $::form;
1175
  my $locale   = $::locale;
1176
  my %myconfig = %::myconfig;
1165 1177

  
1166
  $auth->assert('advance_turnover_tax_return');
1178
  $::auth->assert('advance_turnover_tax_return');
1167 1179

  
1168 1180
  $form->header();
1169 1181

  
......
1177 1189
  my $elstersteuernummer = '';
1178 1190

  
1179 1191
  my $ustva = USTVA->new();
1180
  $ustva->get_config($userspath, 'finanzamt.ini')
1192
  $ustva->get_config($::userspath, 'finanzamt.ini')
1181 1193
    if ($form->{saved} eq $locale->text('saved'));
1182 1194

  
1183 1195
  # Auf Übergabefehler checken
......
1242 1254
  my $patterncount   = $form->{patterncount};
1243 1255
  my $elster_pattern = $form->{elster_pattern};
1244 1256
  my $delimiter      = $form->{delimiter};
1245
  my $steuernummer = $form->{steuernummer} if ($steuernummer eq '');
1257
  my $steuernummer = $form->{steuernummer} if ($stnr eq '');
1246 1258

  
1247 1259
  $form->{FA_Oeffnungszeiten} =~ s/\\\\n/\n/g;
1248 1260

  
......
1255 1267
                             $form->{steuernummer}
1256 1268
  );
1257 1269

  
1258
  $lxdebug->message(LXDebug::DEBUG1, qq|$input_steuernummer|);
1270
  $::lxdebug->message(LXDebug->DEBUG1, qq|$input_steuernummer|);
1259 1271

  
1260 1272

  
1261 1273
  my $_hidden_variables_ref;
......
1263 1275
  my %_hidden_local_variables = (
1264 1276
      'elsterland'          => $elsterland,
1265 1277
      'elsterFFFF'          => $elsterFFFF,
1266
      'warnung'             => $warnung,
1278
      'warnung'             => 0,
1267 1279
      'elstersteuernummer'  => $elstersteuernummer,
1268 1280
      'steuernummer'        => $stnr,
1269 1281
      'lastsub'             => 'config_step1',
......
1292 1304
  }
1293 1305

  
1294 1306
  my $template_ref = {
1295
     tax_office_data                 => $tax_office_data,
1296 1307
     input_steuernummer              => $input_steuernummer,
1297 1308
     readonly                        => '', #q|disabled="disabled"|,
1298
     callback                        => $callback,
1309
     callback                        => $form->{callback},
1299 1310
     hidden_variables                => $_hidden_variables_ref,
1300 1311
  };
1301 1312

  
......
1303 1314
  print($form->parse_html_template('ustva/config_step2', $template_ref));
1304 1315

  
1305 1316

  
1306
  $lxdebug->leave_sub();
1317
  $::lxdebug->leave_sub();
1307 1318
}
1308 1319

  
1309 1320
sub create_steuernummer {
1310
  $lxdebug->enter_sub();
1321
  $::lxdebug->enter_sub();
1311 1322

  
1312
  $auth->assert('advance_turnover_tax_return');
1323
  $::auth->assert('advance_turnover_tax_return');
1313 1324

  
1314
  my $part           = $form->{part};
1315
  my $patterncount   = $form->{patterncount};
1316
  my $delimiter      = $form->{delimiter};
1317
  my $elster_pattern = $form->{elster_pattern};
1325
  my $part           = $::form->{part};
1326
  my $patterncount   = $::form->{patterncount};
1327
  my $delimiter      = $::form->{delimiter};
1328
  my $elster_pattern = $::form->{elster_pattern};
1318 1329

  
1319 1330
  # rebuild steuernummer and elstersteuernummer
1320 1331
  # es gibt eine gespeicherte steuernummer $form->{steuernummer}
......
1324 1335
  my $i = 0;
1325 1336

  
1326 1337
  my $steuernummer_new       = $part;
1327
  my $elstersteuernummer_new = $form->{elster_FFFF};
1338
  my $elstersteuernummer_new = $::form->{elster_FFFF};
1328 1339
  $elstersteuernummer_new .= '0';
1329 1340

  
1330 1341
  for ($h = 1; $h < $patterncount; $h++) {
1331 1342
    $steuernummer_new .= qq|$delimiter|;
1332 1343
    for (my $i = 1; $i <= length($elster_pattern); $i++) {
1333
      $steuernummer_new       .= $form->{"part_$h\_$i"};
1334
      $elstersteuernummer_new .= $form->{"part_$h\_$i"};
1344
      $steuernummer_new       .= $::form->{"part_$h\_$i"};
1345
      $elstersteuernummer_new .= $::form->{"part_$h\_$i"};
1335 1346
    }
1336 1347
  }
1337
  if ($form->{steuernummer} ne $steuernummer_new) {
1338
    $form->{steuernummer}       = $steuernummer_new;
1339
    $form->{elstersteuernummer} = $elstersteuernummer_new;
1340
    $form->{steuernummer_new}   = $steuernummer_new;
1348
  if ($::form->{steuernummer} ne $steuernummer_new) {
1349
    $::form->{steuernummer}       = $steuernummer_new;
1350
    $::form->{elstersteuernummer} = $elstersteuernummer_new;
1351
    $::form->{steuernummer_new}   = $steuernummer_new;
1341 1352
  } else {
1342
    $form->{steuernummer_new}       = '';
1343
    $form->{elstersteuernummer_new} = '';
1353
    $::form->{steuernummer_new}       = '';
1354
    $::form->{elstersteuernummer_new} = '';
1344 1355
  }
1345
  $lxdebug->leave_sub();
1356
  $::lxdebug->leave_sub();
1346 1357
}
1347 1358

  
1348 1359
sub save {
1349
  $lxdebug->enter_sub();
1360
  $::lxdebug->enter_sub();
1350 1361

  
1351
  $auth->assert('advance_turnover_tax_return');
1362
  $::auth->assert('advance_turnover_tax_return');
1352 1363

  
1353
  my $filename = "$form->{login}_$form->{filename}";
1364
  my $filename = "$::form->{login}_$::form->{filename}";
1354 1365
  $filename =~ s|.*/||;
1355 1366

  
1356 1367
  #zuerst die steuernummer aus den part, parts_X_Y und delimiter herstellen
......
1358 1369

  
1359 1370
  # Textboxen formatieren: Linebreaks entfernen
1360 1371
  #
1361
  $form->{FA_Oeffnungszeiten} =~ s/\r\n/\\n/g;
1372
  $::form->{FA_Oeffnungszeiten} =~ s/\r\n/\\n/g;
1362 1373

  
1363 1374
  #URL mit http:// davor?
1364
  $form->{FA_Internet} =~ s/^http:\/\///;
1365
  $form->{FA_Internet} = 'http://' . $form->{FA_Internet};
1375
  $::form->{FA_Internet} =~ s/^http:\/\///;
1376
  $::form->{FA_Internet} = 'http://' . $::form->{FA_Internet};
1366 1377

  
1367 1378
  my @config = qw(
1368 1379
    elster              elsterland            elstersteuernummer  steuernummer
......
1376 1387
    FA_71 FA_dauerfrist);
1377 1388

  
1378 1389
  # Hier kommt dann die Plausibilitätsprüfung der ELSTERSteuernummer
1379
  if ($form->{elstersteuernummer} ne '000000000') {
1390
  if ($::form->{elstersteuernummer} ne '000000000') {
1380 1391

  
1381
    $form->{elster} = '1';
1392
    $::form->{elster} = '1';
1382 1393

  
1383
    open my $ustvaconfig, ">", "$userspath/$filename" or $form->error("$filename : $!");
1394
    open my $ustvaconfig, ">", "$::userspath/$filename" or $::form->error("$filename : $!");
1384 1395

  
1385 1396
    # create the config file
1386 1397
    print {$ustvaconfig} qq|# Configuration file for USTVA\n\n|;
1387 1398
    my $key = '';
1388 1399
    foreach $key (sort @config) {
1389
      $form->{$key} =~ s/\\/\\\\/g;
1400
      $::form->{$key} =~ s/\\/\\\\/g;
1390 1401
      # strip M
1391
      $form->{$key} =~ s/\r\n/\n/g;
1402
      $::form->{$key} =~ s/\r\n/\n/g;
1392 1403

  
1393 1404
      print {$ustvaconfig} qq|$key=|;
1394
      if ($form->{$key} ne 'Y') {
1395
        print {$ustvaconfig} qq|$form->{$key}\n|;
1405
      if ($::form->{$key} ne 'Y') {
1406
        print {$ustvaconfig} qq|$::form->{$key}\n|;
1396 1407
      }
1397
      if ($form->{$key} eq 'Y') {
1408
      if ($::form->{$key} eq 'Y') {
1398 1409
        print {$ustvaconfig} qq|checked \n|;
1399 1410
      }
1400 1411
    }
1401 1412
    print {$ustvaconfig} qq|\n\n|;
1402 1413
    close $ustvaconfig;
1403
    $form->{saved} = $locale->text('saved');
1414
    $::form->{saved} = $::locale->text('saved');
1404 1415

  
1405 1416
  } else {
1406 1417

  
1407
    $form->{saved} = $locale->text('Choose a Tax Number');
1418
    $::form->{saved} = $::locale->text('Choose a Tax Number');
1408 1419
  }
1409 1420

  
1410 1421
  config_step2();
1411
  $lxdebug->leave_sub();
1422
  $::lxdebug->leave_sub();
1412 1423
}
1413 1424

  
1414 1425

  
1415 1426
sub continue {
1416
  $lxdebug->enter_sub();
1427
  $::lxdebug->enter_sub();
1417 1428

  
1418 1429
  # allow Symbolic references just here:
1419
  no strict 'refs';
1420
  call_sub($form->{"nextsub"});
1421
  use strict 'refs';
1422
  $lxdebug->leave_sub();
1430
  call_sub($::form->{"nextsub"});
1431
  $::lxdebug->leave_sub();
1423 1432
}
1424 1433

  
1425 1434
sub back {
1426
  $lxdebug->enter_sub();
1427
  call_sub($form->{"lastsub"});
1428
  $lxdebug->leave_sub();
1435
  $::lxdebug->enter_sub();
1436
  call_sub($::form->{"lastsub"});
1437
  $::lxdebug->leave_sub();
1429 1438
}
1430 1439

  

Auch abrufbar als: Unified diff