Revision 1ef9fe2f
Von Udo Spallek vor etwa 19 Jahren hinzugefügt
bin/mozilla/gl.pl | ||
---|---|---|
391 | 391 |
|
392 | 392 |
$form->{title} = $locale->text('General Ledger'); |
393 | 393 |
|
394 |
$ml = ($form->{ml} =~ /(A|E)/) ? -1 : 1; |
|
394 |
$ml = ($form->{ml} =~ /(A|E|Q)/) ? -1 : 1;
|
|
395 | 395 |
|
396 | 396 |
unless ($form->{category} eq 'X') { |
397 | 397 |
$form->{title} .= " : " . $locale->text($acctype{ $form->{category} }); |
... | ... | |
616 | 616 |
</tr> |
617 | 617 |
|; |
618 | 618 |
} |
619 |
|
|
619 |
$form->{balance} *= $ml; |
|
620 | 620 |
foreach $ref (@{ $form->{GL} }) { |
621 |
|
|
621 |
$form->{balance} *= $ml; |
|
622 | 622 |
# if item ne sort print subtotal |
623 | 623 |
if ($form->{l_subtotal} eq 'Y') { |
624 | 624 |
if ($sameitem ne $ref->{ $form->{sort} }) { |
625 | 625 |
&gl_subtotal; |
626 | 626 |
} |
627 | 627 |
} |
628 |
foreach $key (sort keys(%{ $ref->{amount} })) { |
|
629 |
$form->{balance} += $ref->{amount}{$key}; |
|
630 |
} |
|
628 |
#foreach $key (sort keys(%{ $ref->{amount} })) {
|
|
629 |
# $form->{balance} += $ref->{amount}{$key};
|
|
630 |
#}
|
|
631 | 631 |
|
632 | 632 |
$debit = ""; |
633 | 633 |
foreach $key (sort keys(%{ $ref->{debit} })) { |
... | ... | |
639 | 639 |
$debit .= |
640 | 640 |
"<br>" . $form->format_amount(\%myconfig, $ref->{debit}{$key}, 2, 0); |
641 | 641 |
} |
642 |
$form->{balance} = abs($form->{balance}) - abs($ref->{debit}{$key}); |
|
642 | 643 |
} |
643 | 644 |
|
644 | 645 |
$credit = ""; |
... | ... | |
651 | 652 |
$credit .= "<br>" |
652 | 653 |
. $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0); |
653 | 654 |
} |
655 |
$form->{balance} = abs($form->{balance}) - abs( $ref->{credit}{$key}); |
|
654 | 656 |
} |
655 | 657 |
|
656 | 658 |
$debittax = ""; |
... | ... | |
664 | 666 |
$debittax .= "<br>" |
665 | 667 |
. $form->format_amount(\%myconfig, $ref->{debit_tax}{$key}, 2, 0); |
666 | 668 |
} |
669 |
$form->{balance} = abs($form->{balance}) - abs($ref->{debit_tax}{$key}); |
|
667 | 670 |
} |
668 | 671 |
|
669 | 672 |
$credittax = ""; |
... | ... | |
677 | 680 |
$credittax .= "<br>" |
678 | 681 |
. $form->format_amount(\%myconfig, $ref->{credit_tax}{$key}, 2, 0); |
679 | 682 |
} |
683 |
$form->{balance} = abs($form->{balance}) - abs($ref->{credit_tax}{$key}); |
|
680 | 684 |
} |
681 | 685 |
|
682 | 686 |
$debitaccno = ""; |
... | ... | |
769 | 773 |
"<td><a href=$href&gifi_accno=$ref->{gifi_accno}&callback=$callback>$ref->{gifi_accno}</a> </td>"; |
770 | 774 |
$column_data{balance} = |
771 | 775 |
"<td align=right>" |
772 |
. $form->format_amount(\%myconfig, $form->{balance} * $ml, 2, 0)
|
|
776 |
. $form->format_amount(\%myconfig, $form->{balance}, 2, 0) |
|
773 | 777 |
. "</td>"; |
774 | 778 |
|
775 | 779 |
$i++; |
Auch abrufbar als: Unified diff
Unbalanced Ledger Workaround... Betr. Bugzilla ID 124