projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2d558c
)
Solved Bug 365: Falsche UStVA bei negativem Vorsteuer-Betrag (Teil 2)
author
Udo Spallek
<info@wissensvermittlung.com>
Tue, 20 Jun 2006 11:06:10 +0000
(11:06 +0000)
committer
Udo Spallek
<info@wissensvermittlung.com>
Tue, 20 Jun 2006 11:06:10 +0000
(11:06 +0000)
SL/USTVA.pm
patch
|
blob
|
history
diff --git
a/SL/USTVA.pm
b/SL/USTVA.pm
index
f1bd2a0
..
3cb7ff8
100644
(file)
--- a/
SL/USTVA.pm
+++ b/
SL/USTVA.pm
@@
-724,14
+724,17
@@
sub get_accounts_ustva {
UNION
- SELECT sum(ac.amount) AS amount,
+ SELECT sum(
+ CASE WHEN c.link LIKE '%AR%' THEN ac.amount * -1
+ WHEN c.link LIKE '%AP%' THEN ac.amount * 1
+ END
+ ) AS amount,
c.$category
FROM acc_trans ac
JOIN chart c ON (c.id = ac.chart_id)
JOIN gl a ON (a.id = ac.trans_id)
$dpt_join
WHERE $where
- $glwhere
$dpt_from
AND NOT (c.link = 'AR' OR c.link = 'AP')
$project