39 |
39 |
|
40 |
40 |
use SL::PE;
|
41 |
41 |
use SL::RP;
|
42 |
|
use SL::USTVA;
|
43 |
42 |
use SL::Iconv;
|
44 |
43 |
use SL::ReportGenerator;
|
45 |
44 |
|
... | ... | |
107 |
106 |
'receipts' => 'Receipts',
|
108 |
107 |
'payments' => 'Payments',
|
109 |
108 |
'projects' => 'Project Transactions',
|
110 |
|
'bwa' => 'Betriebswirtschaftliche Auswertung',
|
111 |
|
'ustva' => 'Umsatzsteuervoranmeldung',);
|
|
109 |
'bwa' => 'Betriebswirtschaftliche Auswertung',);
|
112 |
110 |
|
113 |
111 |
$form->{title} = $locale->text($title{ $form->{report} });
|
114 |
112 |
|
... | ... | |
153 |
151 |
# use JavaScript Calendar or not
|
154 |
152 |
$form->{jsscript} = 1;
|
155 |
153 |
$jsscript = "";
|
156 |
|
if ($form->{report} eq "ustva") {
|
157 |
|
$department = "";
|
|
154 |
if ($form->{report} eq "balance_sheet") {
|
|
155 |
$name_1 = "asofdate";
|
|
156 |
$id_1 = "asofdate";
|
|
157 |
$value_1 = "$form->{asofdate}";
|
|
158 |
$trigger_1 = "trigger1";
|
|
159 |
$name_2 = "compareasofdate";
|
|
160 |
$id_2 = "compareasofdate";
|
|
161 |
$value_2 = "$form->{compareasofdate}";
|
|
162 |
$trigger_2 = "trigger2";
|
|
163 |
} elsif ($form->{report} =~ /(receipts|payments)$/) {
|
|
164 |
$name_1 = "fromdate";
|
|
165 |
$id_1 = "fromdate";
|
|
166 |
$value_1 = "$form->{fromdate}";
|
|
167 |
$trigger_1 = "trigger1";
|
|
168 |
$name_2 = "todate";
|
|
169 |
$id_2 = "todate";
|
|
170 |
$value_2 = "";
|
|
171 |
$trigger_2 = "trigger2";
|
|
172 |
} elsif (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
|
|
173 |
$name_1 = "";
|
|
174 |
$id_1 = "";
|
|
175 |
$value_1 = "";
|
|
176 |
$trigger_1 = "";
|
|
177 |
$name_2 = "todate";
|
|
178 |
$id_2 = "todate";
|
|
179 |
$value_2 = "";
|
|
180 |
$trigger_2 = "trigger2";
|
|
181 |
|
158 |
182 |
} else {
|
159 |
|
if ($form->{report} eq "balance_sheet") {
|
160 |
|
$name_1 = "asofdate";
|
161 |
|
$id_1 = "asofdate";
|
162 |
|
$value_1 = "$form->{asofdate}";
|
163 |
|
$trigger_1 = "trigger1";
|
164 |
|
$name_2 = "compareasofdate";
|
165 |
|
$id_2 = "compareasofdate";
|
166 |
|
$value_2 = "$form->{compareasofdate}";
|
167 |
|
$trigger_2 = "trigger2";
|
168 |
|
} elsif ($form->{report} =~ /(receipts|payments)$/) {
|
169 |
|
$name_1 = "fromdate";
|
170 |
|
$id_1 = "fromdate";
|
171 |
|
$value_1 = "$form->{fromdate}";
|
172 |
|
$trigger_1 = "trigger1";
|
173 |
|
$name_2 = "todate";
|
174 |
|
$id_2 = "todate";
|
175 |
|
$value_2 = "";
|
176 |
|
$trigger_2 = "trigger2";
|
177 |
|
} else {
|
178 |
|
if (($form->{report} eq "ar_aging") || ($form->{report} eq "ap_aging")) {
|
179 |
|
$name_1 = "";
|
180 |
|
$id_1 = "";
|
181 |
|
$value_1 = "";
|
182 |
|
$trigger_1 = "";
|
183 |
|
$name_2 = "todate";
|
184 |
|
$id_2 = "todate";
|
185 |
|
$value_2 = "";
|
186 |
|
$trigger_2 = "trigger2";
|
187 |
|
|
188 |
|
} else {
|
189 |
|
$name_1 = "fromdate";
|
190 |
|
$id_1 = "fromdate";
|
191 |
|
$value_1 = "$form->{fromdate}";
|
192 |
|
$trigger_1 = "trigger1";
|
193 |
|
$name_2 = "todate";
|
194 |
|
$id_2 = "todate";
|
195 |
|
$value_2 = "";
|
196 |
|
$trigger_2 = "trigger2";
|
197 |
|
}
|
198 |
|
}
|
|
183 |
$name_1 = "fromdate";
|
|
184 |
$id_1 = "fromdate";
|
|
185 |
$value_1 = "$form->{fromdate}";
|
|
186 |
$trigger_1 = "trigger1";
|
|
187 |
$name_2 = "todate";
|
|
188 |
$id_2 = "todate";
|
|
189 |
$value_2 = "";
|
|
190 |
$trigger_2 = "trigger2";
|
199 |
191 |
}
|
200 |
192 |
|
201 |
193 |
# with JavaScript Calendar
|
... | ... | |
524 |
516 |
|;
|
525 |
517 |
}
|
526 |
518 |
|
527 |
|
if ($form->{report} eq "ustva") {
|
528 |
|
|
529 |
|
print qq|
|
530 |
|
|
531 |
|
<br>
|
532 |
|
<input type=hidden name=nextsub value=generate_ustva>
|
533 |
|
</table>
|
534 |
|
<table>
|
535 |
|
<tr>
|
536 |
|
<th align=left><input name=reporttype class=radio type=radio value="custom" checked> |
|
537 |
|
. $locale->text('Zeitraum') . qq|</th>
|
538 |
|
</tr>
|
539 |
|
<tr>
|
540 |
|
<th colspan=1>| . $locale->text('Year') . qq|</th>
|
541 |
|
<td><input name=year size=11 title="|
|
542 |
|
. $locale->text('YYYY') . qq|" value="$year"></td>
|
543 |
|
</tr>
|
544 |
|
|;
|
545 |
|
|
546 |
|
print qq|
|
547 |
|
<tr>
|
548 |
|
<td align=right>
|
549 |
|
<b> | . $locale->text('Yearly') . qq|</b> </td>
|
550 |
|
<th align=left>| . $locale->text('Quarterly') . qq|</th>
|
551 |
|
<th align=left colspan=3>| . $locale->text('Monthly') . qq|</th>
|
552 |
|
</tr>
|
553 |
|
<tr>
|
554 |
|
<td align=right> <input name=duetyp class=radio type=radio value="13"
|
555 |
|
$checked></td>
|
556 |
|
<td><input name=duetyp class=radio type=radio value="A" $checked > 1. |
|
557 |
|
. $locale->text('Quarter') . qq|</td>
|
558 |
|
|;
|
559 |
|
$checked = "checked";
|
560 |
|
print qq|
|
561 |
|
<td><input name=duetyp class=radio type=radio value="1" $checked > |
|
562 |
|
. $locale->text('January') . qq|</td>
|
563 |
|
|;
|
564 |
|
$checked = "";
|
565 |
|
print qq|
|
566 |
|
<td><input name=duetyp class=radio type=radio value="5" $checked > |
|
567 |
|
. $locale->text('May') . qq|</td>
|
568 |
|
<td><input name=duetyp class=radio type=radio value="9" $checked > |
|
569 |
|
. $locale->text('September') . qq|</td>
|
570 |
|
|
571 |
|
</tr>
|
572 |
|
<tr>
|
573 |
|
<td align= right> </td>
|
574 |
|
<td><input name=duetyp class=radio type=radio value="B" $checked> 2. |
|
575 |
|
. $locale->text('Quarter') . qq|</td>
|
576 |
|
<td><input name=duetyp class=radio type=radio value="2" $checked > |
|
577 |
|
. $locale->text('February') . qq|</td>
|
578 |
|
<td><input name=duetyp class=radio type=radio value="6" $checked > |
|
579 |
|
. $locale->text('June') . qq|</td>
|
580 |
|
<td><input name=duetyp class=radio type=radio value="10" $checked > |
|
581 |
|
. $locale->text('October') . qq|</td>
|
582 |
|
</tr>
|
583 |
|
<tr>
|
584 |
|
<td> </td>
|
585 |
|
<td><input name=duetyp class=radio type=radio value="C" $checked> 3. |
|
586 |
|
. $locale->text('Quarter') . qq|</td>
|
587 |
|
<td><input name=duetyp class=radio type=radio value="3" $checked > |
|
588 |
|
. $locale->text('March') . qq|</td>
|
589 |
|
<td><input name=duetyp class=radio type=radio value="7" $checked > |
|
590 |
|
. $locale->text('July') . qq|</td>
|
591 |
|
<td><input name=duetyp class=radio type=radio value="11" $checked > |
|
592 |
|
. $locale->text('November') . qq|</td>
|
593 |
|
|
594 |
|
</tr>
|
595 |
|
<tr>
|
596 |
|
<td> </td>
|
597 |
|
<td><input name=duetyp class=radio type=radio value="D" $checked> 4. |
|
598 |
|
. $locale->text('Quarter') . qq| </td>
|
599 |
|
<td><input name=duetyp class=radio type=radio value="4" $checked > |
|
600 |
|
. $locale->text('April') . qq|</td>
|
601 |
|
<td><input name=duetyp class=radio type=radio value="8" $checked > |
|
602 |
|
. $locale->text('August') . qq|</td>
|
603 |
|
<td><input name=duetyp class=radio type=radio value="12" $checked > |
|
604 |
|
. $locale->text('December') . qq|</td>
|
605 |
|
|
606 |
|
</tr>
|
607 |
|
<tr>
|
608 |
|
<td colspan=5><hr size=3 noshade></td>
|
609 |
|
</tr>
|
610 |
|
<tr>
|
611 |
|
<th align=left>| . $locale->text('Method') . qq|</th>
|
612 |
|
<td colspan=3><input name=method class=radio type=radio value=accrual $accrual>|
|
613 |
|
. $locale->text('Accrual') . qq|
|
614 |
|
<input name=method class=radio type=radio value=cash $cash>|
|
615 |
|
. $locale->text('EUR') . qq|</td>
|
616 |
|
</tr>
|
617 |
|
<tr>
|
618 |
|
<th colspan=4>|;
|
619 |
|
##########
|
620 |
|
|
621 |
|
&print_options();
|
622 |
|
print qq|
|
623 |
|
</th>
|
624 |
|
</tr>
|
625 |
|
|;
|
626 |
|
}
|
627 |
|
|
628 |
519 |
if ($form->{report} eq "balance_sheet") {
|
629 |
520 |
print qq|
|
630 |
521 |
<input type=hidden name=nextsub value=generate_balance_sheet>
|
... | ... | |
986 |
877 |
|
987 |
878 |
<input type=submit class=submit name=action value="|
|
988 |
879 |
. $locale->text('Continue') . qq|">
|
989 |
|
|;
|
990 |
|
|
991 |
|
# Hier Aufruf von get_config zum Einlesen der Finanzamtdaten
|
992 |
|
USTVA->get_config($userspath, 'finanzamt.ini');
|
993 |
|
|
994 |
|
$disabled = qq|disabled="disabled"|;
|
995 |
|
$disabled = '' if ($form->{elster} eq '1');
|
996 |
|
if ($form->{report} eq 'ustva') {
|
997 |
|
print qq|
|
998 |
|
<input type=submit class=submit name=action value="|
|
999 |
|
. $locale->text('debug') . qq|">
|
1000 |
|
<input type=submit class=submit name=action $disabled
|
1001 |
|
value="| . $locale->text('winston_export') . qq|">
|
1002 |
|
|;
|
1003 |
|
print qq|
|
1004 |
|
<input type=submit class=submit name=action value="|
|
1005 |
|
. $locale->text('config') . qq|">
|
1006 |
|
|;
|
1007 |
|
}
|
1008 |
880 |
|
1009 |
|
print qq|
|
1010 |
881 |
</form>
|
1011 |
882 |
|
1012 |
883 |
</body>
|
... | ... | |
2259 |
2130 |
$lxdebug->leave_sub();
|
2260 |
2131 |
}
|
2261 |
2132 |
|
2262 |
|
sub config {
|
2263 |
|
$lxdebug->enter_sub();
|
2264 |
|
edit();
|
2265 |
|
|
2266 |
|
#$form->header;
|
2267 |
|
#print qq|Hallo|;
|
2268 |
|
$lxdebug->leave_sub();
|
2269 |
|
}
|
2270 |
|
|
2271 |
|
sub debug {
|
2272 |
|
|
2273 |
|
$form->debug();
|
2274 |
|
|
2275 |
|
}
|
2276 |
|
|
2277 |
|
sub winston_export {
|
2278 |
|
$lxdebug->enter_sub();
|
2279 |
|
|
2280 |
|
#create_winston();
|
2281 |
|
$form->{winston} = 1;
|
2282 |
|
&generate_ustva();
|
2283 |
|
$lxdebug->leave_sub();
|
2284 |
|
}
|
2285 |
|
|
2286 |
2133 |
sub print_options {
|
2287 |
2134 |
$lxdebug->enter_sub();
|
2288 |
2135 |
|
... | ... | |
2305 |
2152 |
$form->{OP}{ $form->{media} } = "selected";
|
2306 |
2153 |
$form->{SM}{ $form->{sendmode} } = "selected";
|
2307 |
2154 |
|
2308 |
|
if ($form->{report} eq 'ustva') {
|
2309 |
|
$type = qq|
|
2310 |
|
<option value=ustva $form->{PD}{ustva}>| . $locale->text('ustva');
|
2311 |
|
} else {
|
2312 |
|
$type = qq|
|
|
2155 |
$type = qq|
|
2313 |
2156 |
<option value=statement $form->{PD}{statement}>|
|
2314 |
2157 |
. $locale->text('Statement');
|
2315 |
|
}
|
2316 |
2158 |
|
2317 |
2159 |
if ($form->{media} eq 'email') {
|
2318 |
2160 |
$media = qq|
|
... | ... | |
2331 |
2173 |
|
2332 |
2174 |
if ($latex_templates) {
|
2333 |
2175 |
$format .= qq|
|
2334 |
|
<option value=html $form->{DF}{html}>|
|
2335 |
|
. $locale->text('HTML') . qq|
|
2336 |
|
<option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
|
2337 |
|
if ($form->{report} ne 'ustva') {
|
2338 |
|
$format . qq|
|
2339 |
|
<option value=postscript $form->{DF}{postscript}>|
|
2340 |
|
. $locale->text('Postscript');
|
2341 |
|
}
|
|
2176 |
<option value=html $form->{DF}{html}>| . $locale->text('HTML')
|
|
2177 |
. qq| <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF')
|
|
2178 |
. qq| <option value=postscript $form->{DF}{postscript}>| . $locale->text('Postscript');
|
2342 |
2179 |
}
|
2343 |
2180 |
|
2344 |
2181 |
my $output = qq|
|
... | ... | |
2560 |
2397 |
$lxdebug->leave_sub();
|
2561 |
2398 |
}
|
2562 |
2399 |
|
2563 |
|
sub generate_ustva {
|
2564 |
|
$lxdebug->enter_sub();
|
2565 |
|
|
2566 |
|
# Hier Aufruf von get_config zum Einlesen der Finanzamtdaten
|
2567 |
|
USTVA->get_config($userspath, 'finanzamt.ini');
|
2568 |
|
|
2569 |
|
# &get_project(generate_bwa);
|
2570 |
|
@anmeldungszeitraum =
|
2571 |
|
qw(0401, 0402, 0403, 0404, 0405, 0405, 0406, 0407, 0408, 0409, 0410, 0411, 0412, 0441, 0442, 0443, 0444);
|
2572 |
|
|
2573 |
|
foreach $item (@anmeldungszeitraum) {
|
2574 |
|
$form->{$item} = "";
|
2575 |
|
}
|
2576 |
|
if ($form->{reporttype} eq "custom") {
|
2577 |
|
|
2578 |
|
#forgotten the year --> thisyear
|
2579 |
|
if ($form->{year} !~ m/^\d\d\d\d$/) {
|
2580 |
|
$locale->date(\%myconfig, $form->current_date(\%myconfig), 0) =~
|
2581 |
|
/(\d\d\d\d)/;
|
2582 |
|
$form->{year} = $1;
|
2583 |
|
}
|
2584 |
|
|
2585 |
|
#yearly report
|
2586 |
|
if ($form->{duetyp} eq "13") {
|
2587 |
|
$form->{fromdate} = "1.1.$form->{year}";
|
2588 |
|
$form->{todate} = "31.12.$form->{year}";
|
2589 |
|
}
|
2590 |
|
|
2591 |
|
#Quater reports
|
2592 |
|
if ($form->{duetyp} eq "A") {
|
2593 |
|
$form->{fromdate} = "1.1.$form->{year}";
|
2594 |
|
$form->{todate} = "31.3.$form->{year}";
|
2595 |
|
$form->{"0441"} = "X";
|
2596 |
|
}
|
2597 |
|
if ($form->{duetyp} eq "B") {
|
2598 |
|
$form->{fromdate} = "1.4.$form->{year}";
|
2599 |
|
$form->{todate} = "30.6.$form->{year}";
|
2600 |
|
$form->{"0442"} = "X";
|
2601 |
|
}
|
2602 |
|
if ($form->{duetyp} eq "C") {
|
2603 |
|
$form->{fromdate} = "1.7.$form->{year}";
|
2604 |
|
$form->{todate} = "30.9.$form->{year}";
|
2605 |
|
$form->{"0443"} = "X";
|
2606 |
|
}
|
2607 |
|
if ($form->{duetyp} eq "D") {
|
2608 |
|
$form->{fromdate} = "1.10.$form->{year}";
|
2609 |
|
$form->{todate} = "31.12.$form->{year}";
|
2610 |
|
$form->{"0444"} = "X";
|
2611 |
|
}
|
2612 |
|
|
2613 |
|
#Monthly reports
|
2614 |
|
SWITCH: {
|
2615 |
|
$form->{duetyp} eq "1" && do {
|
2616 |
|
$form->{fromdate} = "1.1.$form->{year}";
|
2617 |
|
$form->{todate} = "31.1.$form->{year}";
|
2618 |
|
$form->{"0401"} = "X";
|
2619 |
|
last SWITCH;
|
2620 |
|
};
|
2621 |
|
$form->{duetyp} eq "2" && do {
|
2622 |
|
$form->{fromdate} = "1.2.$form->{year}";
|
2623 |
|
|
2624 |
|
#this works from 1901 to 2099, 1900 and 2100 fail.
|
2625 |
|
$leap = ($form->{year} % 4 == 0) ? "29" : "28";
|
2626 |
|
$form->{todate} = "$leap.2.$form->{year}";
|
2627 |
|
$form->{"0402"} = "X";
|
2628 |
|
last SWITCH;
|
2629 |
|
};
|
2630 |
|
$form->{duetyp} eq "3" && do {
|
2631 |
|
$form->{fromdate} = "1.3.$form->{year}";
|
2632 |
|
$form->{todate} = "31.3.$form->{year}";
|
2633 |
|
$form->{"0403"} = "X";
|
2634 |
|
last SWITCH;
|
2635 |
|
};
|
2636 |
|
$form->{duetyp} eq "4" && do {
|
2637 |
|
$form->{fromdate} = "1.4.$form->{year}";
|
2638 |
|
$form->{todate} = "30.4.$form->{year}";
|
2639 |
|
$form->{"0404"} = "X";
|
2640 |
|
last SWITCH;
|
2641 |
|
};
|
2642 |
|
$form->{duetyp} eq "5" && do {
|
2643 |
|
$form->{fromdate} = "1.5.$form->{year}";
|
2644 |
|
$form->{todate} = "31.5.$form->{year}";
|
2645 |
|
$form->{"0405"} = "X";
|
2646 |
|
last SWITCH;
|
2647 |
|
};
|
2648 |
|
$form->{duetyp} eq "6" && do {
|
2649 |
|
$form->{fromdate} = "1.6.$form->{year}";
|
2650 |
|
$form->{todate} = "30.6.$form->{year}";
|
2651 |
|
$form->{"0406"} = "X";
|
2652 |
|
last SWITCH;
|
2653 |
|
};
|
2654 |
|
$form->{duetyp} eq "7" && do {
|
2655 |
|
$form->{fromdate} = "1.7.$form->{year}";
|
2656 |
|
$form->{todate} = "31.7.$form->{year}";
|
2657 |
|
$form->{"0407"} = "X";
|
2658 |
|
last SWITCH;
|
2659 |
|
};
|
2660 |
|
$form->{duetyp} eq "8" && do {
|
2661 |
|
$form->{fromdate} = "1.8.$form->{year}";
|
2662 |
|
$form->{todate} = "31.8.$form->{year}";
|
2663 |
|
$form->{"0408"} = "X";
|
2664 |
|
last SWITCH;
|
2665 |
|
};
|
2666 |
|
$form->{duetyp} eq "9" && do {
|
2667 |
|
$form->{fromdate} = "1.9.$form->{year}";
|
2668 |
|
$form->{todate} = "30.9.$form->{year}";
|
2669 |
|
$form->{"0409"} = "X";
|
2670 |
|
last SWITCH;
|
2671 |
|
};
|
2672 |
|
$form->{duetyp} eq "10" && do {
|
2673 |
|
$form->{fromdate} = "1.10.$form->{year}";
|
2674 |
|
$form->{todate} = "31.10.$form->{year}";
|
2675 |
|
$form->{"0410"} = "X";
|
2676 |
|
last SWITCH;
|
2677 |
|
};
|
2678 |
|
$form->{duetyp} eq "11" && do {
|
2679 |
|
$form->{fromdate} = "1.11.$form->{year}";
|
2680 |
|
$form->{todate} = "30.11.$form->{year}";
|
2681 |
|
$form->{"0411"} = "X";
|
2682 |
|
last SWITCH;
|
2683 |
|
};
|
2684 |
|
$form->{duetyp} eq "12" && do {
|
2685 |
|
$form->{fromdate} = "1.12.$form->{year}";
|
2686 |
|
$form->{todate} = "31.12.$form->{year}";
|
2687 |
|
$form->{"0412"} = "X";
|
2688 |
|
last SWITCH;
|
2689 |
|
};
|
2690 |
|
}
|
2691 |
|
}
|
2692 |
|
|
2693 |
|
# $locale->date(\%myconfig, $form->current_date(\%myconfig), 0)=~ /(\d\d\d\d)/;
|
2694 |
|
# $form->{year}= $1;
|
2695 |
|
# $form->{fromdate}="1.1.$form->{year}";
|
2696 |
|
# $form->{todate}="31.3.$form->{year}";
|
2697 |
|
# $form->{period} = $locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
|
2698 |
|
# }
|
2699 |
|
|
2700 |
|
RP->ustva(\%myconfig, \%$form);
|
2701 |
|
|
2702 |
|
($form->{department}) = split /--/, $form->{department};
|
2703 |
|
|
2704 |
|
$form->{period} =
|
2705 |
|
$locale->date(\%myconfig, $form->current_date(\%myconfig), 1);
|
2706 |
|
$form->{todate} = $form->current_date(\%myconfig) unless $form->{todate};
|
2707 |
|
|
2708 |
|
# if there are any dates construct a where
|
2709 |
|
if ($form->{fromdate} || $form->{todate}) {
|
2710 |
|
|
2711 |
|
unless ($form->{todate}) {
|
2712 |
|
$form->{todate} = $form->current_date(\%myconfig);
|
2713 |
|
}
|
2714 |
|
|
2715 |
|
$longtodate = $locale->date(\%myconfig, $form->{todate}, 1);
|
2716 |
|
$shorttodate = $locale->date(\%myconfig, $form->{todate}, 0);
|
2717 |
|
|
2718 |
|
$longfromdate = $locale->date(\%myconfig, $form->{fromdate}, 1);
|
2719 |
|
$shortfromdate = $locale->date(\%myconfig, $form->{fromdate}, 0);
|
2720 |
|
|
2721 |
|
$form->{this_period} = "$shortfromdate\n$shorttodate";
|
2722 |
|
$form->{period} =
|
2723 |
|
$locale->text('for Period')
|
2724 |
|
. qq|<br>\n$longfromdate |
|
2725 |
|
. $locale->text('bis')
|
2726 |
|
. qq| $longtodate|;
|
2727 |
|
}
|
2728 |
|
|
2729 |
|
if ($form->{comparefromdate} || $form->{comparetodate}) {
|
2730 |
|
$longcomparefromdate =
|
2731 |
|
$locale->date(\%myconfig, $form->{comparefromdate}, 1);
|
2732 |
|
$shortcomparefromdate =
|
2733 |
|
$locale->date(\%myconfig, $form->{comparefromdate}, 0);
|
2734 |
|
|
2735 |
|
$longcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 1);
|
2736 |
|
$shortcomparetodate = $locale->date(\%myconfig, $form->{comparetodate}, 0);
|
2737 |
|
|
2738 |
|
$form->{last_period} = "$shortcomparefromdate\n$shortcomparetodate";
|
2739 |
|
$form->{period} .=
|
2740 |
|
"\n$longcomparefromdate "
|
2741 |
|
. $locale->text('bis')
|
2742 |
|
. qq| $longcomparetodate|;
|
2743 |
|
}
|
2744 |
|
|
2745 |
|
$form->{Datum_heute} =
|
2746 |
|
$locale->date(\%myconfig, $form->current_date(\%myconfig), 0);
|
2747 |
|
|
2748 |
|
if ( $form->{format} eq 'pdf'
|
2749 |
|
or $form->{format} eq 'postscript') {
|
2750 |
|
$form->{padding} = "~~";
|
2751 |
|
$form->{bold} = "\textbf{";
|
2752 |
|
$form->{endbold} = "}";
|
2753 |
|
$form->{br} = '\\\\';
|
2754 |
|
|
2755 |
|
@numbers = qw(51r 86r 97r 93r 96 43 45
|
2756 |
|
66 62 67);
|
2757 |
|
foreach $number (@numbers) {
|
2758 |
|
$form->{$number} =~ s/,/~~/g;
|
2759 |
|
}
|
2760 |
|
|
2761 |
|
} elsif ($form->{format} eq 'html') {
|
2762 |
|
$form->{padding} = " ";
|
2763 |
|
$form->{bold} = "<b>";
|
2764 |
|
$form->{endbold} = "</b>";
|
2765 |
|
$form->{br} = "<br>"
|
2766 |
|
|
2767 |
|
}
|
2768 |
|
|
2769 |
|
# setup variables for the form
|
2770 |
|
@a = qw(company address businessnumber);
|
2771 |
|
map { $form->{$_} = $myconfig{$_} } @a;
|
2772 |
|
|
2773 |
|
$form->{address} =~ s/\\n/$form->{br}/g;
|
2774 |
|
|
2775 |
|
if ($form->{winston} eq '1') {
|
2776 |
|
create_winston();
|
2777 |
|
|
2778 |
|
} else {
|
2779 |
|
$form->{templates} = $myconfig{templates};
|
2780 |
|
$form->{IN} = "$form->{type}";
|
2781 |
|
$form->{IN} .= '.tex'
|
2782 |
|
if ( $form->{format} eq 'pdf'
|
2783 |
|
or $form->{format} eq 'postscript');
|
2784 |
|
$form->{IN} .= '.html' if ($form->{format} eq 'html');
|
2785 |
|
|
2786 |
|
$form->parse_template(\%myconfig, $userspath);
|
2787 |
|
|
2788 |
|
# $form->parse_template;
|
2789 |
|
}
|
2790 |
|
$lxdebug->leave_sub();
|
2791 |
|
}
|
Alten USTVA-Code aus rp.pl entfernt.