projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge von 741 aus unstable: Bugfix 214
[kivitendo-erp.git]
/
SL
/
CA.pm
diff --git
a/SL/CA.pm
b/SL/CA.pm
index
2ab7e47
..
ac64c37
100644
(file)
--- a/
SL/CA.pm
+++ b/
SL/CA.pm
@@
-234,7
+234,7
@@
sub all_transactions {
UNION
UNION
- SELECT SUM(ac.sellprice)
+ SELECT SUM(ac.
qty * ac.
sellprice)
FROM invoice ac
JOIN ar a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
FROM invoice ac
JOIN ar a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
@@
-248,7
+248,7
@@
sub all_transactions {
UNION
UNION
- SELECT SUM(ac.sellprice)
+ SELECT SUM(ac.
qty * ac.
sellprice)
FROM invoice ac
JOIN ap a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
FROM invoice ac
JOIN ap a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
@@
-280,7
+280,7
@@
sub all_transactions {
UNION
UNION
- SELECT SUM(ac.sellprice)
+ SELECT SUM(ac.
qty * ac.
sellprice)
FROM invoice ac
JOIN ar a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
FROM invoice ac
JOIN ar a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
@@
-294,7
+294,7
@@
sub all_transactions {
UNION
UNION
- SELECT SUM(ac.sellprice)
+ SELECT SUM(ac.
qty * ac.
sellprice)
FROM invoice ac
JOIN ap a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
FROM invoice ac
JOIN ap a ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
@@
-369,9
+369,9
@@
sub all_transactions {
$query .= qq|
UNION ALL
$query .= qq|
UNION ALL
-
+
SELECT a.id, a.invnumber, c.name, a.transdate,
SELECT a.id, a.invnumber, c.name, a.transdate,
- a.invoice, ac.sellprice, 'ar' as module
+ a.invoice, ac.
qty * ac.sellprice AS
sellprice, 'ar' as module
FROM ar a
JOIN invoice ac ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
FROM ar a
JOIN invoice ac ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
@@
-382,11
+382,11
@@
sub all_transactions {
$todate_where
$dpt_where
$project
$todate_where
$dpt_where
$project
-
+
UNION ALL
UNION ALL
-
+
SELECT a.id, a.invnumber, v.name, a.transdate,
SELECT a.id, a.invnumber, v.name, a.transdate,
- a.invoice, ac.sellprice, 'ap' as module
+ a.invoice, ac.
qty * ac.sellprice AS
sellprice, 'ap' as module
FROM ap a
JOIN invoice ac ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
FROM ap a
JOIN invoice ac ON (ac.trans_id = a.id)
JOIN parts p ON (ac.parts_id = p.id)
@@
-451,4
+451,3
@@
sub all_transactions {
}
1;
}
1;
-