1 #=====================================================================
4 # Based on SQL-Ledger Version 2.1.9
5 # Web http://www.lx-office.org
7 #=====================================================================
8 # SQL-Ledger Accounting
9 # Copyright (c) 1998-2002
11 # Author: Dieter Simader
12 # Email: dsimader@sql-ledger.org
13 # Web: http://www.sql-ledger.org
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #======================================================================
32 #======================================================================
37 require "$form->{path}/arap.pl";
43 # this is for our long dates
44 # $locale->text('January')
45 # $locale->text('February')
46 # $locale->text('March')
47 # $locale->text('April')
48 # $locale->text('May ')
49 # $locale->text('June')
50 # $locale->text('July')
51 # $locale->text('August')
52 # $locale->text('September')
53 # $locale->text('October')
54 # $locale->text('November')
55 # $locale->text('December')
57 # this is for our short month
58 # $locale->text('Jan')
59 # $locale->text('Feb')
60 # $locale->text('Mar')
61 # $locale->text('Apr')
62 # $locale->text('May')
63 # $locale->text('Jun')
64 # $locale->text('Jul')
65 # $locale->text('Aug')
66 # $locale->text('Sep')
67 # $locale->text('Oct')
68 # $locale->text('Nov')
69 # $locale->text('Dec')
72 $lxdebug->enter_sub();
74 $form->{title} = "Add";
77 "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}"
78 unless $form->{callback};
80 # we use this only to set a default date
81 GL->transaction(\%myconfig, \%$form);
85 "<option value=\"$_->{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}</option>"
86 } @{ $form->{chart} };
89 qq|<option value="$_->{taxkey}--$_->{rate}">$_->{taxdescription} |
90 . ($_->{rate} * 100) . qq| %|
93 $form->{chart} = $chart;
94 $form->{chartinit} = $chart;
95 $form->{rowcount} = 2;
97 $form->{debitchart} = $chart;
98 $form->{creditchart} = $chart;
99 $form->{taxchart} = $tax;
106 $form->all_departments(\%myconfig);
107 if (@{ $form->{all_departments} }) {
108 $form->{selectdepartment} = "<option>\n";
111 $form->{selectdepartment} .=
112 "<option>$_->{description}--$_->{id}\n"
113 } (@{ $form->{all_departments} });
117 $lxdebug->leave_sub();
122 $lxdebug->enter_sub();
124 GL->transaction(\%myconfig, \%$form);
127 "<option value=\"$_->{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}</option>"
128 } @{ $form->{chart} };
132 qq|<option value="$_->{taxkey}--$_->{rate}">$_->{taxdescription} |
133 . ($_->{rate} * 100) . qq| %|
136 $form->{chart} = $chart;
138 $form->{taxchart} = $tax;
140 $form->{amount} = $form->format_amount(\%myconfig, $form->{amount}, 2);
143 $form->all_departments(\%myconfig);
144 if (@{ $form->{all_departments} }) {
145 $form->{selectdepartment} = "<option>\n";
148 $form->{selectdepartment} .=
149 "<option>$_->{description}--$_->{id}\n"
150 } (@{ $form->{all_departments} });
156 foreach $ref (@{ $form->{GL} }) {
157 $form->{"projectnumber_$i"} = "$ref->{projectnumber}--$ref->{project_id}";
160 if ($tax && ($ref->{accno} eq $taxaccno)) {
161 $form->{"tax_$j"} = abs($ref->{amount});
162 $form->{"taxchart_$j"} = $ref->{taxkey} . "--" . $ref->{taxrate};
163 if ($form->{taxincluded}) {
164 if ($ref->{amount} < 0) {
165 $form->{"debit_$j"} += $form->{"tax_$j"};
167 $form->{"credit_$j"} += $form->{"tax_$j"};
171 $form->{"accno_$i"} = "$ref->{accno}--$ref->{accnotaxkey}";
172 for (qw(fx_transaction source memo)) { $form->{"${_}_$i"} = $ref->{$_} }
173 if ($ref->{amount} < 0) {
174 $form->{totaldebit} -= $ref->{amount};
175 $form->{"debit_$i"} = $ref->{amount} * -1;
177 $form->{totalcredit} += $ref->{amount};
178 $form->{"credit_$i"} = $ref->{amount};
180 $form->{"taxchart_$i"} = "0--";
183 if ($ref->{taxaccno} && !$tax) {
184 $taxaccno = $ref->{taxaccno};
193 $form->{rowcount} = $i;
195 ($form->datetonum($form->{transdate}, \%myconfig) <=
196 $form->datetonum($form->{closedto}, \%myconfig));
198 $form->{title} = "Edit";
203 $lxdebug->leave_sub();
208 $lxdebug->enter_sub();
210 $form->{title} = $locale->text('Buchungsjournal');
212 $form->all_departments(\%myconfig);
215 if (@{ $form->{all_departments} }) {
216 $form->{selectdepartment} = "<option>\n";
219 $form->{selectdepartment} .=
220 "<option>$_->{description}--$_->{id}\n"
221 } (@{ $form->{all_departments} });
226 <th align=right nowrap>| . $locale->text('Department') . qq|</th>
227 <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
229 | if $form->{selectdepartment};
231 # use JavaScript Calendar or not
232 $form->{jsscript} = $jscalendar;
234 if ($form->{jsscript}) {
236 # with JavaScript Calendar
238 <td><input name=datefrom id=datefrom size=11 title="$myconfig{dateformat}">
239 <input type=button name=datefrom id="trigger1" value=|
240 . $locale->text('button') . qq|></td>
243 <td><input name=dateto id=dateto size=11 title="$myconfig{dateformat}">
244 <input type=button name=dateto id="trigger2" value=|
245 . $locale->text('button') . qq|></td>
250 Form->write_trigger(\%myconfig, "2", "datefrom", "BR", "trigger1",
251 "dateto", "BL", "trigger2");
254 # without JavaScript Calendar
256 qq|<td><input name=datefrom id=datefrom size=11 title="$myconfig{dateformat}"></td>|;
258 qq|<td><input name=dateto id=dateto size=11 title="$myconfig{dateformat}"></td>|;
266 <form method=post action=$form->{script}>
268 <input type=hidden name=sort value=transdate>
272 <th class=listtop>$form->{title}</th>
279 <th align=right>| . $locale->text('Reference') . qq|</th>
280 <td><input name=reference size=20></td>
281 <th align=right>| . $locale->text('Source') . qq|</th>
282 <td><input name=source size=20></td>
286 <th align=right>| . $locale->text('Description') . qq|</th>
287 <td colspan=3><input name=description size=40></td>
290 <th align=right>| . $locale->text('Notes') . qq|</th>
291 <td colspan=3><input name=notes size=40></td>
294 <th align=right>| . $locale->text('From') . qq|</th>
299 <th align=right>| . $locale->text('Include in Report') . qq|</th>
304 <input name="category" class=radio type=radio value=X checked> |
305 . $locale->text('All') . qq|
306 <input name="category" class=radio type=radio value=A> |
307 . $locale->text('Asset') . qq|
308 <input name="category" class=radio type=radio value=C> |
309 . $locale->text('Contra') . qq|
310 <input name="category" class=radio type=radio value=L> |
311 . $locale->text('Liability') . qq|
312 <input name="category" class=radio type=radio value=Q> |
313 . $locale->text('Equity') . qq|
314 <input name="category" class=radio type=radio value=I> |
315 . $locale->text('Revenue') . qq|
316 <input name="category" class=radio type=radio value=E> |
317 . $locale->text('Expense') . qq|
323 <td align=right><input name="l_id" class=checkbox type=checkbox value=Y></td>
324 <td>| . $locale->text('ID') . qq|</td>
325 <td align=right><input name="l_transdate" class=checkbox type=checkbox value=Y checked></td>
326 <td>| . $locale->text('Date') . qq|</td>
327 <td align=right><input name="l_reference" class=checkbox type=checkbox value=Y checked></td>
328 <td>| . $locale->text('Reference') . qq|</td>
329 <td align=right><input name="l_description" class=checkbox type=checkbox value=Y checked></td>
330 <td>| . $locale->text('Description') . qq|</td>
331 <td align=right><input name="l_notes" class=checkbox type=checkbox value=Y></td>
332 <td>| . $locale->text('Notes') . qq|</td>
335 <td align=right><input name="l_debit" class=checkbox type=checkbox value=Y checked></td>
336 <td>| . $locale->text('Debit') . qq|</td>
337 <td align=right><input name="l_credit" class=checkbox type=checkbox value=Y checked></td>
338 <td>| . $locale->text('Credit') . qq|</td>
339 <td align=right><input name="l_source" class=checkbox type=checkbox value=Y checked></td>
340 <td>| . $locale->text('Source') . qq|</td>
341 <td align=right><input name="l_accno" class=checkbox type=checkbox value=Y checked></td>
342 <td>| . $locale->text('Account') . qq|</td>
343 <td align=right><input name="l_gifi_accno" class=checkbox type=checkbox value=Y></td>
344 <td>| . $locale->text('GIFI') . qq|</td>
347 <td align=right><input name="l_subtotal" class=checkbox type=checkbox value=Y></td>
348 <td>| . $locale->text('Subtotal') . qq|</td>
358 <td><hr size=3 noshade></td>
364 <input type=hidden name=nextsub value=generate_report>
366 <input type=hidden name=path value=$form->{path}>
367 <input type=hidden name=login value=$form->{login}>
368 <input type=hidden name=password value=$form->{password}>
371 <input class=submit type=submit name=action value="|
372 . $locale->text('Continue') . qq|">
378 $lxdebug->leave_sub();
381 sub generate_report {
382 $lxdebug->enter_sub();
384 $form->{sort} = "transdate" unless $form->{sort};
386 GL->all_transactions(\%myconfig, \%$form);
389 "$form->{script}?action=generate_report&path=$form->{path}&login=$form->{login}&password=$form->{password}";
393 %acctype = ('A' => $locale->text('Asset'),
394 'C' => $locale->text('Contra'),
395 'L' => $locale->text('Liability'),
396 'Q' => $locale->text('Equity'),
397 'I' => $locale->text('Revenue'),
398 'E' => $locale->text('Expense'),);
400 $form->{title} = $locale->text('General Ledger');
402 $ml = ($form->{ml} =~ /(A|E|Q)/) ? -1 : 1;
404 unless ($form->{category} eq 'X') {
405 $form->{title} .= " : " . $locale->text($acctype{ $form->{category} });
407 if ($form->{accno}) {
408 $href .= "&accno=" . $form->escape($form->{accno});
409 $callback .= "&accno=" . $form->escape($form->{accno}, 1);
411 $locale->text('Account')
412 . " : $form->{accno} $form->{account_description}";
414 if ($form->{gifi_accno}) {
415 $href .= "&gifi_accno=" . $form->escape($form->{gifi_accno});
416 $callback .= "&gifi_accno=" . $form->escape($form->{gifi_accno}, 1);
417 $option .= "\n<br>" if $option;
419 $locale->text('GIFI')
420 . " : $form->{gifi_accno} $form->{gifi_account_description}";
422 if ($form->{source}) {
423 $href .= "&source=" . $form->escape($form->{source});
424 $callback .= "&source=" . $form->escape($form->{source}, 1);
425 $option .= "\n<br>" if $option;
426 $option .= $locale->text('Source') . " : $form->{source}";
428 if ($form->{reference}) {
429 $href .= "&reference=" . $form->escape($form->{reference});
430 $callback .= "&reference=" . $form->escape($form->{reference}, 1);
431 $option .= "\n<br>" if $option;
432 $option .= $locale->text('Reference') . " : $form->{reference}";
434 if ($form->{department}) {
435 $href .= "&department=" . $form->escape($form->{department});
436 $callback .= "&department=" . $form->escape($form->{department}, 1);
437 ($department) = split /--/, $form->{department};
438 $option .= "\n<br>" if $option;
439 $option .= $locale->text('Department') . " : $department";
442 if ($form->{description}) {
443 $href .= "&description=" . $form->escape($form->{description});
444 $callback .= "&description=" . $form->escape($form->{description}, 1);
445 $option .= "\n<br>" if $option;
446 $option .= $locale->text('Description') . " : $form->{description}";
448 if ($form->{notes}) {
449 $href .= "¬es=" . $form->escape($form->{notes});
450 $callback .= "¬es=" . $form->escape($form->{notes}, 1);
451 $option .= "\n<br>" if $option;
452 $option .= $locale->text('Notes') . " : $form->{notes}";
455 if ($form->{datefrom}) {
456 $href .= "&datefrom=$form->{datefrom}";
457 $callback .= "&datefrom=$form->{datefrom}";
458 $option .= "\n<br>" if $option;
460 $locale->text('From') . " "
461 . $locale->date(\%myconfig, $form->{datefrom}, 1);
463 if ($form->{dateto}) {
464 $href .= "&dateto=$form->{dateto}";
465 $callback .= "&dateto=$form->{dateto}";
466 if ($form->{datefrom}) {
469 $option .= "\n<br>" if $option;
472 $locale->text('Bis') . " "
473 . $locale->date(\%myconfig, $form->{dateto}, 1);
476 @columns = $form->sort_columns(
477 qw(transdate id reference description notes source debit debit_accno credit credit_accno debit_tax debit_tax_accno credit_tax credit_tax_accno accno gifi_accno)
480 if ($form->{accno} || $form->{gifi_accno}) {
481 @columns = grep !/(accno|gifi_accno)/, @columns;
482 push @columns, "balance";
483 $form->{l_balance} = "Y";
487 $form->{l_credit_accno} = "Y";
488 $form->{l_debit_accno} = "Y";
489 $form->{l_credit_tax} = "Y";
490 $form->{l_debit_tax} = "Y";
491 $form->{l_credit_tax_accno} = "Y";
492 $form->{l_debit_tax_accno} = "Y";
493 $form->{l_accno} = "N";
494 foreach $item (@columns) {
495 if ($form->{"l_$item"} eq "Y") {
496 push @column_index, $item;
498 # add column to href and callback
499 $callback .= "&l_$item=Y";
500 $href .= "&l_$item=Y";
504 if ($form->{l_subtotal} eq 'Y') {
505 $callback .= "&l_subtotal=Y";
506 $href .= "&l_subtotal=Y";
509 $callback .= "&category=$form->{category}";
510 $href .= "&category=$form->{category}";
513 "<th><a class=listheading href=$href&sort=id>"
514 . $locale->text('ID')
516 $column_header{transdate} =
517 "<th><a class=listheading href=$href&sort=transdate>"
518 . $locale->text('Date')
520 $column_header{reference} =
521 "<th><a class=listheading href=$href&sort=reference>"
522 . $locale->text('Reference')
524 $column_header{source} =
525 "<th><a class=listheading href=$href&sort=source>"
526 . $locale->text('Source')
528 $column_header{description} =
529 "<th><a class=listheading href=$href&sort=description>"
530 . $locale->text('Description')
532 $column_header{notes} =
533 "<th class=listheading>" . $locale->text('Notes') . "</th>";
534 $column_header{debit} =
535 "<th class=listheading>" . $locale->text('Debit') . "</th>";
536 $column_header{debit_accno} =
537 "<th><a class=listheading href=$href&sort=accno>"
538 . $locale->text('Debit Account')
540 $column_header{credit} =
541 "<th class=listheading>" . $locale->text('Credit') . "</th>";
542 $column_header{credit_accno} =
543 "<th><a class=listheading href=$href&sort=accno>"
544 . $locale->text('Credit Account')
546 $column_header{debit_tax} =
547 "<th><a class=listheading href=$href&sort=accno>"
548 . $locale->text('Debit Tax')
550 $column_header{debit_tax_accno} =
551 "<th><a class=listheading href=$href&sort=accno>"
552 . $locale->text('Debit Tax Account')
554 $column_header{credit_tax} =
555 "<th><a class=listheading href=$href&sort=accno>"
556 . $locale->text('Credit Tax')
558 $column_header{credit_tax_accno} =
559 "<th><a class=listheading href=$href&sort=accno>"
560 . $locale->text('Credit Tax Account')
562 $column_header{gifi_accno} =
563 "<th><a class=listheading href=$href&sort=gifi_accno>"
564 . $locale->text('GIFI')
566 $column_header{balance} = "<th>" . $locale->text('Balance') . "</th>";
568 $form->{landscape} = 1;
577 <th class=listtop>$form->{title}</th>
587 <tr class=listheading>
590 map { print "$column_header{$_}\n" } @column_index;
599 # add sort to callback
600 $form->{callback} = "$callback&sort=$form->{sort}";
601 $callback = $form->escape($form->{callback});
603 # initial item for subtotals
604 if (@{ $form->{GL} }) {
605 $sameitem = $form->{GL}->[0]->{ $form->{sort} };
608 if (($form->{accno} || $form->{gifi_accno}) && $form->{balance}) {
610 map { $column_data{$_} = "<td> </td>" } @column_index;
611 $column_data{balance} =
613 . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0)
621 map { print "$column_data{$_}\n" } @column_index;
627 $form->{balance} *= $ml;
628 foreach $ref (@{ $form->{GL} }) {
629 $form->{balance} *= $ml;
630 # if item ne sort print subtotal
631 if ($form->{l_subtotal} eq 'Y') {
632 if ($sameitem ne $ref->{ $form->{sort} }) {
636 #foreach $key (sort keys(%{ $ref->{amount} })) {
637 # $form->{balance} += $ref->{amount}{$key};
641 foreach $key (sort keys(%{ $ref->{debit} })) {
642 $subtotaldebit += $ref->{debit}{$key};
643 $totaldebit += $ref->{debit}{$key};
645 $debit = $form->format_amount(\%myconfig, $ref->{debit}{$key}, 2, 0);
648 "<br>" . $form->format_amount(\%myconfig, $ref->{debit}{$key}, 2, 0);
650 $form->{balance} = abs($form->{balance}) - abs($ref->{debit}{$key});
654 foreach $key (sort keys(%{ $ref->{credit} })) {
655 $subtotalcredit += $ref->{credit}{$key};
656 $totalcredit += $ref->{credit}{$key};
658 $credit = $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0);
661 . $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0);
663 $form->{balance} = abs($form->{balance}) - abs( $ref->{credit}{$key});
667 foreach $key (sort keys(%{ $ref->{debit_tax} })) {
668 $subtotaldebittax += $ref->{debit_tax}{$key};
669 $totaldebittax += $ref->{debit_tax}{$key};
672 $form->format_amount(\%myconfig, $ref->{debit_tax}{$key}, 2, 0);
675 . $form->format_amount(\%myconfig, $ref->{debit_tax}{$key}, 2, 0);
677 $form->{balance} = abs($form->{balance}) - abs($ref->{debit_tax}{$key});
681 foreach $key (sort keys(%{ $ref->{credit_tax} })) {
682 $subtotalcredittax += $ref->{credit_tax}{$key};
683 $totalcredittax += $ref->{credit_tax}{$key};
686 $form->format_amount(\%myconfig, $ref->{credit_tax}{$key}, 2, 0);
689 . $form->format_amount(\%myconfig, $ref->{credit_tax}{$key}, 2, 0);
691 $form->{balance} = abs($form->{balance}) - abs($ref->{credit_tax}{$key});
697 foreach $key (sort keys(%{ $ref->{debit_accno} })) {
700 "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_accno}{$key}</a>";
703 "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_accno}{$key}</a>";
705 if ($ref->{debit_taxkey}{$key} eq $debittaxkey) {
706 $ref->{debit_tax_accno}{$key} = $taxaccno;
708 $taxaccno = $ref->{debit_tax_accno}{$key};
709 $debittaxkey = $ref->{debit_taxkey}{$key};
715 foreach $key (sort keys(%{ $ref->{credit_accno} })) {
718 "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_accno}{$key}</a>";
721 "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_accno}{$key}</a>";
723 if ($ref->{credit_taxkey}{$key} eq $credittaxkey) {
724 $ref->{credit_tax_accno}{$key} = $taxaccno;
726 $taxaccno = $ref->{credit_tax_accno}{$key};
727 $credittaxkey = $ref->{credit_taxkey}{$key};
731 foreach $key (sort keys(%{ $ref->{debit_tax_accno} })) {
734 "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_tax_accno}{$key}</a>";
737 "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{debit_tax_accno}{$key}</a>";
741 $credittaxaccno = "";
742 foreach $key (sort keys(%{ $ref->{credit_tax_accno} })) {
745 "<a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_tax_accno}{$key}</a>";
748 "<br><a href=$href&accno=$ref->{accno}&callback=$callback>$ref->{credit_tax_accno}{$key}</a>";
752 # $ref->{debit} = $form->format_amount(\%myconfig, $ref->{debit}, 2, " ");
753 # $ref->{credit} = $form->format_amount(\%myconfig, $ref->{credit}, 2, " ");
755 $column_data{id} = "<td align=right> $ref->{id} </td>";
756 $column_data{transdate} =
757 "<td align=center> $ref->{transdate} </td>";
758 $column_data{reference} =
759 "<td align=center><a href=$ref->{module}.pl?action=edit&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{reference}</td>";
760 $column_data{description} =
761 "<td align=center>$ref->{description} </td>";
762 $column_data{source} = "<td align=center>$ref->{source} </td>";
763 $column_data{notes} = "<td align=center>$ref->{notes} </td>";
764 $column_data{debit} = "<td align=right>$debit</td>";
765 $column_data{debit_accno} = "<td align=center>$debitaccno</td>";
766 $column_data{credit} = "<td align=right>$credit</td>";
767 $column_data{credit_accno} = "<td align=center>$creditaccno</td>";
768 $column_data{debit_tax} =
769 ($ref->{debit_tax_accno} ne "")
770 ? "<td align=right>$debittax</td>"
772 $column_data{debit_tax_accno} = "<td align=center>$debittaxaccno</td>";
773 $column_data{gifi_accno} =
774 "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a> </td>";
775 $column_data{credit_tax} =
776 ($ref->{credit_tax_accno} ne "")
777 ? "<td align=right>$credittax</td>"
779 $column_data{credit_tax_accno} = "<td align=center>$credittaxaccno</td>";
780 $column_data{gifi_accno} =
781 "<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a> </td>";
782 $column_data{balance} =
784 . $form->format_amount(\%myconfig, $form->{balance}, 2, 0)
790 <tr class=listrow$i>";
791 map { print "$column_data{$_}\n" } @column_index;
796 &gl_subtotal if ($form->{l_subtotal} eq 'Y');
798 map { $column_data{$_} = "<td> </td>" } @column_index;
800 $column_data{debit} =
801 "<th align=right class=listtotal>"
802 . $form->format_amount(\%myconfig, $totaldebit, 2, " ") . "</th>";
803 $column_data{credit} =
804 "<th align=right class=listtotal>"
805 . $form->format_amount(\%myconfig, $totalcredit, 2, " ") . "</th>";
806 $column_data{debit_tax} =
807 "<th align=right class=listtotal>"
808 . $form->format_amount(\%myconfig, $totaldebittax, 2, " ") . "</th>";
809 $column_data{credit_tax} =
810 "<th align=right class=listtotal>"
811 . $form->format_amount(\%myconfig, $totalcredittax, 2, " ") . "</th>";
812 $column_data{balance} =
813 "<th align=right class=listtotal>"
814 . $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0) . "</th>";
820 map { print "$column_data{$_}\n" } @column_index;
829 <td><hr size=3 noshade></td>
835 <form method=post action=$form->{script}>
837 <input name=callback type=hidden value="$form->{callback}">
839 <input type=hidden name=path value=$form->{path}>
840 <input type=hidden name=login value=$form->{login}>
841 <input type=hidden name=password value=$form->{password}>
843 <input class=submit type=submit name=action value="|
844 . $locale->text('GL Transaction') . qq|">
845 <input class=submit type=submit name=action value="|
846 . $locale->text('AR Transaction') . qq|">
847 <input class=submit type=submit name=action value="|
848 . $locale->text('AP Transaction') . qq|">
849 <input class=submit type=submit name=action value="|
850 . $locale->text('Sales Invoice') . qq|">
851 <input class=submit type=submit name=action value="|
852 . $locale->text('Vendor Invoice') . qq|">|;
854 if ($form->{menubar}) {
855 require "$form->{path}/menu.pl";
866 $lxdebug->leave_sub();
871 $lxdebug->enter_sub();
874 $form->format_amount(\%myconfig, $subtotaldebit, 2, " ");
876 $form->format_amount(\%myconfig, $subtotalcredit, 2, " ");
878 map { $column_data{$_} = "<td> </td>" }
879 qw(transdate id reference source description accno);
880 $column_data{debit} = "<th align=right>$subtotaldebit</td>";
881 $column_data{credit} = "<th align=right>$subtotalcredit</td>";
883 print "<tr class=listsubtotal>";
884 map { print "$column_data{$_}\n" } @column_index;
890 $sameitem = $ref->{ $form->{sort} };
891 $lxdebug->leave_sub();
896 $lxdebug->enter_sub();
898 if ($form->{transdate} ne $form->{oldtransdate}) {
899 if ($form->{selectprojectnumber}) {
900 $form->all_projects(\%myconfig, undef, $form->{transdate});
901 if (@{ $form->{all_project} }) {
902 $form->{selectprojectnumber} = "<option>\n";
903 for (@{ $form->{all_project} }) {
904 $form->{selectprojectnumber} .=
905 qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|;
907 $form->{selectprojectnumber} =
908 $form->escape($form->{selectprojectnumber}, 1);
911 $form->{oldtransdate} = $form->{transdate};
924 qw(accno debit credit projectnumber fx_transaction source memo tax taxchart);
926 for my $i (1 .. $form->{rowcount}) {
928 unless (($form->{"debit_$i"} eq "") && ($form->{"credit_$i"} eq "")) {
929 for (qw(debit credit tax)) {
931 $form->parse_amount(\%myconfig, $form->{"${_}_$i"});
935 $debitcredit = ($form->{"debit_$i"} == 0) ? "0" : "1";
942 if (($debitcount >= 2) && ($creditcount == 2)) {
943 $form->{"credit_$i"} = 0;
944 $form->{"tax_$i"} = 0;
948 if (($creditcount >= 2) && ($debitcount == 2)) {
949 $form->{"debit_$i"} = 0;
950 $form->{"tax_$i"} = 0;
954 if (($creditcount == 1) && ($debitcount == 2)) {
957 if (($creditcount == 2) && ($debitcount == 1)) {
960 if ($debitcredit && $credittax) {
961 $form->{"taxchart_$i"} = "0--0.00";
963 if (!$debitcredit && $debittax) {
964 $form->{"taxchart_$i"} = "0--0.00";
967 ($form->{"debit_$i"} == 0)
968 ? $form->{"credit_$i"}
969 : $form->{"debit_$i"};
971 if (($debitcredit && $credittax) || (!$debitcredit && $debittax)) {
972 $form->{"taxchart_$i"} = "0--";
973 $form->{"tax_$i"} = 0;
975 if (!$form->{"korrektur_$i"}) {
976 ($taxkey, $rate) = split(/--/, $form->{"taxchart_$i"});
983 if ($form->{taxincluded}) {
984 $form->{"tax_$i"} = $amount / ($rate + 1) * $rate;
986 $form->{"tax_$i"} = $amount * $rate;
989 $form->{"tax_$i"} = 0;
993 for (@flds) { $a[$j]->{$_} = $form->{"${_}_$i"} }
998 for $i (1 .. $count) {
1000 for (@flds) { $form->{"${_}_$i"} = $a[$j]->{$_} }
1003 for $i ($count + 1 .. $form->{rowcount}) {
1004 for (@flds) { delete $form->{"${_}_$i"} }
1007 $form->{rowcount} = $count + 1;
1010 $lxdebug->leave_sub();
1016 $lxdebug->enter_sub();
1018 &form_header($init);
1020 # for $i (1 .. $form->{rowcount}) {
1021 # $form->{totaldebit} += $form->parse_amount(\%myconfig, $form->{"debit_$i"});
1022 # $form->{totalcredit} += $form->parse_amount(\%myconfig, $form->{"credit_$i"});
1026 &display_rows($init);
1028 $lxdebug->leave_sub();
1034 $lxdebug->enter_sub();
1036 $form->{selectprojectnumber} = $form->unescape($form->{selectprojectnumber})
1037 if $form->{selectprojectnumber};
1039 $form->{totaldebit} = 0;
1040 $form->{totalcredit} = 0;
1041 my $chart = $form->{chart};
1042 $chart = $form->unquote($chart);
1043 $form->{taxchart} = $form->unquote($form->{taxchart});
1044 $taxchart = $form->{taxchart};
1045 for $i (1 .. $form->{rowcount}) {
1048 <td><input name="source_$i" value="$form->{"source_$i"}" tabindex=|
1049 . ($i + 11 + (($i - 1) * 8)) . qq|></td>|;
1051 <td><input name="memo_$i" value="$form->{"memo_$i"}" tabindex=|
1052 . ($i + 12 + (($i - 1) * 8)) . qq|></td>|;
1056 <td><select name="accno_$i" onChange="setTaxkey(this, $i)" style="width:300px" tabindex=|
1057 . ($i + 5 + (($i - 1) * 8)) . qq|>$form->{chartinit}</select></td>|;
1059 qq|<td><select id="taxchart_$i" name="taxchart_$i" tabindex=|
1060 . ($i + 10 + (($i - 1) * 8))
1061 . qq|>$form->{taxchart}</select></td>|;
1062 # if ($form->{selectprojectnumber}) {
1064 # <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
1067 qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
1068 . ($i + 9 + (($i - 1) * 8))
1070 if ($form->{transfer}) {
1071 $fx_transaction = qq|
1072 <td><input name="fx_transaction_$i" class=checkbox type=checkbox value=1></td>
1077 if ($form->{"debit_$i"} != 0) {
1078 $form->{totaldebit} += $form->{"debit_$i"};
1079 if (!$form->{taxincluded}) {
1080 $form->{totaldebit} += $form->{"tax_$i"};
1083 $form->{totalcredit} += $form->{"credit_$i"};
1084 if (!$form->{taxincluded}) {
1085 $form->{totalcredit} += $form->{"tax_$i"};
1089 for (qw(debit credit tax)) {
1090 $form->{"${_}_$i"} =
1091 ($form->{"${_}_$i"})
1092 ? $form->format_amount(\%myconfig, $form->{"${_}_$i"}, 2)
1096 if ($i < $form->{rowcount}) {
1099 $chart_selected = $form->{"accno_$i"};
1101 s/value=\"$chart_selected\"/value=\"$chart_selected\" selected/;
1103 qq|<td><select name="accno_$i" onChange="setTaxkey(this, $i)" style="width:300px" tabindex=|
1104 . ($i + 5 + (($i - 1) * 8))
1105 . qq|>$accno</select></td>|;
1107 $tax_selected = $form->{"taxchart_$i"};
1108 $tax =~ s/value=\"$tax_selected\"/value=\"$tax_selected\" selected/;
1110 qq|<td><select id="taxchart_$i" name="taxchart_$i" tabindex=|
1111 . ($i + 10 + (($i - 1) * 8))
1112 . qq|>$tax</select></td>|;
1114 # if ($form->{selectprojectnumber}) {
1115 # $form->{"projectnumber_$i"} = ""
1116 # if $form->{selectprojectnumber} !~ /$form->{"projectnumber_$i"}/;
1118 # $project = $form->{"projectnumber_$i"};
1119 # $project =~ s/--.*//;
1120 # $project = qq|<td>$project</td>|;
1123 if ($form->{transfer}) {
1124 $checked = ($form->{"fx_transaction_$i"}) ? "1" : "";
1125 $x = ($checked) ? "x" : "";
1126 $fx_transaction = qq|
1127 <td><input type=hidden name="fx_transaction_$i" value="$checked">$x</td>
1130 $checked = ($form->{"korrektur_$i"}) ? "checked" : "";
1132 qq|<td><input type="checkbox" name="korrektur_$i" value="1" $checked tabindex=|
1133 . ($i + 9 + (($i - 1) * 8))
1135 $form->hide_form("accno_$i");
1140 <td><select name="accno_$i" onChange="setTaxkey(this, $i)" style="width:300px" tabindex=|
1141 . ($i + 5 + (($i - 1) * 8)) . qq|>$chart</select></td>|;
1143 <td><select id="taxchart_$i" name="taxchart_$i" tabindex=|
1144 . ($i + 10 + (($i - 1) * 8)) . qq|>$taxchart</select></td>|;
1145 # if ($form->{selectprojectnumber}) {
1147 # <td><select name="projectnumber_$i">$form->{selectprojectnumber}</select></td>|;
1150 qq|<td><input type="checkbox" name="korrektur_$i" value="1" tabindex=|
1151 . ($i + 9 + (($i - 1) * 8))
1153 if ($form->{transfer}) {
1154 $fx_transaction = qq|
1155 <td><input name="fx_transaction_$i" class=checkbox type=checkbox value=1></td>
1160 my $debitreadonly = "";
1161 my $creditreadonly = "";
1162 if ($i == $form->{rowcount}) {
1164 $debitreadonly = "readonly";
1165 } elsif ($creditlock) {
1166 $creditreadonly = "readonly";
1170 print qq|<tr valign=top>
1173 <td><input name="debit_$i" size=10 value="$form->{"debit_$i"}" accesskey=$i tabindex=|
1174 . ($i + 6 + (($i - 1) * 8)) . qq| $debitreadonly></td>
1175 <td><input name="credit_$i" size=10 value="$form->{"credit_$i"}" tabindex=|
1176 . ($i + 7 + (($i - 1) * 8)) . qq| $creditreadonly></td>
1177 <td><input name="tax_$i" size=8 value="$form->{"tax_$i"}" tabindex=|
1178 . ($i + 8 + (($i - 1) * 8)) . qq|></td>
1188 $form->hide_form(qw(rowcount selectaccno));
1190 # <input type=hidden name=selectprojectnumber value="|
1191 # . $form->escape($form->{selectprojectnumber}, 1) . qq|">|;
1192 $lxdebug->leave_sub();
1198 $lxdebug->enter_sub();
1199 $title = $form->{title};
1200 $form->{title} = $locale->text("$title General Ledger Transaction");
1201 $readonly = ($form->{id}) ? "readonly" : "";
1203 # $locale->text('Add General Ledger Transaction')
1204 # $locale->text('Edit General Ledger Transaction')
1206 map { $form->{$_} =~ s/\"/"/g }
1207 qw(reference description chart taxchart);
1208 $form->{javascript} = qq|<script type="text/javascript">
1210 function setTaxkey(accno, row) {
1211 var taxkey = accno.options[accno.selectedIndex].value;
1212 var reg = /--([0-9])*/;
1213 var found = reg.exec(taxkey);
1214 var index = found[1];
1215 index = parseInt(index);
1216 var tax = 'taxchart_' + row;
1217 for (var i = 0; i < document.getElementById(tax).options.length; ++i) {
1218 var reg2 = new RegExp("^"+ index, "");
1219 if (reg2.exec(document.getElementById(tax).options[i].value)) {
1220 document.getElementById(tax).options[i].selected = true;
1228 $form->{selectdepartment} =~ s/ selected//;
1229 $form->{selectdepartment} =~
1230 s/option>\Q$form->{department}\E/option selected>$form->{department}/;
1232 if (($rows = $form->numtextrows($form->{description}, 50)) > 1) {
1234 qq|<textarea name=description rows=$rows cols=50 wrap=soft $readonly >$form->{description}</textarea>|;
1237 qq|<input name=description size=50 value="$form->{description}" tabindex="3" $readonly>|;
1240 $taxincluded = ($form->{taxincluded}) ? "checked" : "";
1243 $taxincluded = "checked";
1248 <th align=right nowrap>| . $locale->text('Department') . qq|</th>
1249 <td colspan=3><select name=department>$form->{selectdepartment}</select></td>
1250 <input type=hidden name=selectdepartment value="$form->{selectdepartment}">
1252 | if $form->{selectdepartment};
1254 $form->{fokus} = "gl.reference";
1256 $form->{fokus} = qq|gl.accno_$form->{rowcount}|;
1259 # use JavaScript Calendar or not
1260 $form->{jsscript} = $jscalendar;
1262 if ($form->{jsscript}) {
1264 # with JavaScript Calendar
1266 <td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} tabindex="2" $readonly>
1267 <input type=button name=transdate id="trigger1" value=|
1268 . $locale->text('button') . qq|></td>
1273 Form->write_trigger(\%myconfig, "1", "transdate", "BL", "trigger1", "",
1277 # without JavaScript Calendar
1279 qq|<td><input name=transdate id=transdate size=11 title="$myconfig{dateformat}" value=$form->{transdate} tabindex="2" $readonly></td>|;
1285 <body onLoad="fokus()">
1287 <form method=post name="gl" action=$form->{script}>
1289 <input name=id type=hidden value=$form->{id}>
1291 <input type=hidden name=closedto value=$form->{closedto}>
1292 <input type=hidden name=locked value=$form->{locked}>
1293 <input type=hidden name=title value="$title">
1294 <input type=hidden name=taxchart value="$form->{taxchart}">
1295 <input type=hidden name=chart value="$form->{chart}">
1300 <th class=listtop>$form->{title}</th>
1302 <tr height="5"></tr>
1307 <th align=left>| . $locale->text('Reference') . qq|</th>
1308 <td><input name=reference size=20 value="$form->{reference}" tabindex="1" $readonly></td>
1312 <th align=right nowrap>| . $locale->text('Date') . qq|</th>
1321 <th align=right>| . $locale->text('Belegnummer') . qq|</th>
1322 <td><input name=id size=20 value="$form->{id}" $readonly></td>
1326 <th align=right width=50%>| . $locale->text('Buchungsdatum') . qq|</th>
1327 <td align=left><input name=gldate size=11 title="$myconfig{dateformat}" value=$form->{gldate} $readonly></td>
1338 <th align=left width=1%>| . $locale->text('Description') . qq|</th>
1339 <td width=1%>$description</td>
1343 <th align=left>| . $locale->text('MwSt. inkl.') . qq|</th>
1344 <td><input type=checkbox name=taxincluded value=1 tabindex="5" $taxincluded></td>
1351 <th align=right width=50%>| . $locale->text('Mitarbeiter') . qq|</th>
1352 <td align=left><input name=employee size=11 value=$form->{employee} $readonly></td>
1360 <th align=left width=1%>| . $locale->text('Description') . qq|</th>
1361 <td width=1%>$description</td>
1365 <th align=left>| . $locale->text('MwSt. inkl.') . qq|</th>
1366 <td><input type=checkbox name=taxincluded value=1 tabindex="5" $taxincluded></td>
1376 <tr class=listheading>
1377 <th class=listheading style="width:15%">|
1378 . $locale->text('Account') . qq|</th>
1379 <th class=listheading style="width:10%">|
1380 . $locale->text('Debit') . qq|</th>
1381 <th class=listheading style="width:10%">|
1382 . $locale->text('Credit') . qq|</th>
1383 <th class=listheading style="width:10%">|
1384 . $locale->text('Tax') . qq|</th>
1385 <th class=listheading style="width:5%">|
1386 . $locale->text('Korrektur') . qq|</th>
1387 <th class=listheading style="width:10%">|
1388 . $locale->text('Taxkey') . qq|</th>
1389 <th class=listheading style="width:20%">|
1390 . $locale->text('Source') . qq|</th>
1391 <th class=listheading style="width:20%">| . $locale->text('Memo') . qq|</th>
1397 $lxdebug->leave_sub();
1402 $lxdebug->enter_sub();
1403 ($dec) = ($form->{totaldebit} =~ /\.(\d+)/);
1405 $decimalplaces = ($dec > 2) ? $dec : 2;
1406 $radieren = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
1410 $form->format_amount(\%myconfig, $form->{$_}, 2, " ")
1411 } qw(totaldebit totalcredit);
1414 <tr class=listtotal>
1416 <th align=right class=listtotal> $form->{totaldebit}</th>
1417 <th align=right class=listtotal> $form->{totalcredit}</th>
1425 <input type=hidden name=path value=$form->{path}>
1426 <input type=hidden name=login value=$form->{login}>
1427 <input type=hidden name=password value=$form->{password}>
1429 <input name=callback type=hidden value="$form->{callback}">
1434 $transdate = $form->datetonum($form->{transdate}, \%myconfig);
1435 $closedto = $form->datetonum($form->{closedto}, \%myconfig);
1439 print qq|<input class=submit type=submit name=action value="|
1440 . $locale->text('Storno') . qq|">|;
1442 # Löschen und ändern von Buchungen nicht mehr möglich (GoB) nur am selben Tag möglich
1444 if (!$form->{locked} && $radieren) {
1446 <input class=submit type=submit name=action value="|
1447 . $locale->text('Post') . qq|" accesskey="b">
1448 <input class=submit type=submit name=action value="|
1449 . $locale->text('Delete') . qq|">|;
1452 # if ($transdate > $closedto) {
1454 # <input class=submit type=submit name=action value="|.$locale->text('Post as new').qq|">|;
1457 if ($transdate > $closedto) {
1458 print qq|<input class=submit type=submit name=action value="|
1459 . $locale->text('Update') . qq|">
1460 <input class=submit type=submit name=action value="|
1461 . $locale->text('Post') . qq|">|;
1465 if ($form->{menubar}) {
1466 require "$form->{path}/menu.pl";
1476 $lxdebug->leave_sub();
1481 $lxdebug->enter_sub();
1488 <form method=post action=$form->{script}>
1491 map { $form->{$_} =~ s/\"/"/g } qw(reference description chart);
1493 delete $form->{header};
1495 foreach $key (keys %$form) {
1496 print qq|<input type=hidden name=$key value="$form->{$key}">\n|;
1500 <h2 class=confirm>| . $locale->text('Confirm!') . qq|</h2>
1503 . $locale->text('Are you sure you want to delete Transaction')
1504 . qq| $form->{reference}</h4>
1506 <input name=action class=submit type=submit value="|
1507 . $locale->text('Yes') . qq|">
1510 $lxdebug->leave_sub();
1515 $lxdebug->enter_sub();
1517 $form->redirect($locale->text('Transaction deleted!'))
1518 if (GL->delete_transaction(\%myconfig, \%$form));
1519 $form->error($locale->text('Cannot delete transaction!'));
1520 $lxdebug->leave_sub();
1525 $lxdebug->enter_sub();
1527 # check if there is something in reference and date
1528 $form->isblank("reference", $locale->text('Reference missing!'));
1529 $form->isblank("transdate", $locale->text('Transaction Date missing!'));
1530 $form->isblank("description", $locale->text('Description missing!'));
1532 $transdate = $form->datetonum($form->{transdate}, \%myconfig);
1533 $closedto = $form->datetonum($form->{closedto}, \%myconfig);
1543 my $creditcount = 0;
1548 qw(accno debit credit projectnumber fx_transaction source memo tax taxchart);
1549 if ($form->{storno}) {
1550 for my $i (1 .. $form->{rowcount}) {
1551 unless (($form->{"debit_$i"} eq "") && ($form->{"credit_$i"} eq "")) {
1552 if ($form->{"debit_$i"} ne "") {
1553 $form->{"credit_$i"} = $form->{"debit_$i"};
1554 $form->{"debit_$i"} = "";
1555 } elsif ($form->{"credit_$i"} ne "") {
1556 $form->{"debit_$i"} = $form->{"credit_$i"};
1557 $form->{"credit_$i"} = "";
1563 for my $i (1 .. $form->{rowcount}) {
1565 unless (($form->{"debit_$i"} eq "") && ($form->{"credit_$i"} eq "")) {
1566 for (qw(debit credit tax)) {
1567 $form->{"${_}_$i"} =
1568 $form->parse_amount(\%myconfig, $form->{"${_}_$i"});
1572 $debitcredit = ($form->{"debit_$i"} == 0) ? "0" : "1";
1580 if (($debitcount >= 2) && ($creditcount == 2)) {
1581 $form->{"credit_$i"} = 0;
1582 $form->{"tax_$i"} = 0;
1586 if (($creditcount >= 2) && ($debitcount == 2)) {
1587 $form->{"debit_$i"} = 0;
1588 $form->{"tax_$i"} = 0;
1592 if (($creditcount == 1) && ($debitcount == 2)) {
1595 if (($creditcount == 2) && ($debitcount == 1)) {
1598 if ($debitcredit && $credittax) {
1599 $form->{"taxchart_$i"} = "0--0.00";
1601 if (!$debitcredit && $debittax) {
1602 $form->{"taxchart_$i"} = "0--0.00";
1605 ($form->{"debit_$i"} == 0)
1606 ? $form->{"credit_$i"}
1607 : $form->{"debit_$i"};
1609 if (($debitcredit && $credittax) || (!$debitcredit && $debittax)) {
1610 $form->{"taxchart_$i"} = "0--";
1611 $form->{"tax_$i"} = 0;
1613 if (!$form->{"korrektur_$i"}) {
1614 ($taxkey, $rate) = split(/--/, $form->{"taxchart_$i"});
1621 if ($form->{taxincluded}) {
1622 $form->{"tax_$i"} = $amount / ($rate + 1) * $rate;
1624 $form->{"debit_$i"} = $form->{"debit_$i"} - $form->{"tax_$i"};
1626 $form->{"credit_$i"} = $form->{"credit_$i"} - $form->{"tax_$i"};
1629 $form->{"tax_$i"} = $amount * $rate;
1632 $form->{"tax_$i"} = 0;
1634 } elsif ($form->{taxincluded}) {
1636 $form->{"debit_$i"} = $form->{"debit_$i"} - $form->{"tax_$i"};
1638 $form->{"credit_$i"} = $form->{"credit_$i"} - $form->{"tax_$i"};
1642 for (@flds) { $a[$j]->{$_} = $form->{"${_}_$i"} }
1647 for $i (1 .. $count) {
1649 for (@flds) { $form->{"${_}_$i"} = $a[$j]->{$_} }
1652 for $i ($count + 1 .. $form->{rowcount}) {
1653 for (@flds) { delete $form->{"${_}_$i"} }
1656 for $i (1 .. $form->{rowcount}) {
1657 $dr = $form->{"debit_$i"};
1658 $cr = $form->{"credit_$i"};
1659 $tax = $form->{"tax_$i"};
1663 'Cannot post transaction with a debit and credit entry for the same account!'
1666 if ($form->{taxincluded}) {
1668 $debit += $dr + $tax;
1671 $credit += $cr + $tax;
1676 $debit += $dr + $tax;
1679 $credit += $cr + $tax;
1684 $form->{taxincluded} = 0;
1687 # this is just for the wise guys
1688 $form->error($locale->text('Cannot post transaction for a closed period!'))
1689 if ($transdate <= $closedto);
1690 if ($form->round_amount($debit, 2) != $form->round_amount($credit, 2)) {
1691 $form->error($locale->text('Out of balance transaction!'));
1693 if (($errno = GL->post_transaction(\%myconfig, \%$form)) <= -1) {
1695 $err[1] = $locale->text('Cannot have a value in both Debit and Credit!');
1696 $err[2] = $locale->text('Debit and credit out of balance!');
1697 $err[3] = $locale->text('Cannot post a transaction without a value!');
1699 $form->error($err[$errno]);
1701 undef($form->{callback});
1702 $form->redirect("Buchung gespeichert. Buchungsnummer = " . $form->{id});
1703 $lxdebug->leave_sub();
1708 $lxdebug->enter_sub();
1712 $lxdebug->leave_sub();
1717 $lxdebug->enter_sub();
1720 $form->{storno} = 1;
1722 $lxdebug->leave_sub();