Revision 311a645b
Von Udo Spallek vor mehr als 18 Jahren hinzugefügt
SL/USTVA.pm | ||
---|---|---|
724 | 724 |
|
725 | 725 |
UNION |
726 | 726 |
|
727 |
SELECT sum(ac.amount) AS amount, |
|
727 |
SELECT sum( |
|
728 |
CASE WHEN c.link LIKE '%AR%' THEN ac.amount * -1 |
|
729 |
WHEN c.link LIKE '%AP%' THEN ac.amount * 1 |
|
730 |
END |
|
731 |
) AS amount, |
|
728 | 732 |
c.$category |
729 | 733 |
FROM acc_trans ac |
730 | 734 |
JOIN chart c ON (c.id = ac.chart_id) |
731 | 735 |
JOIN gl a ON (a.id = ac.trans_id) |
732 | 736 |
$dpt_join |
733 | 737 |
WHERE $where |
734 |
$glwhere |
|
735 | 738 |
$dpt_from |
736 | 739 |
AND NOT (c.link = 'AR' OR c.link = 'AP') |
737 | 740 |
$project |
Auch abrufbar als: Unified diff
Solved Bug 365: Falsche UStVA bei negativem Vorsteuer-Betrag (Teil 2)