From 1c11922e79195320077a73d4cf215c8882031aa0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Sat, 7 Jan 2006 14:17:11 +0000 Subject: [PATCH] Merge von 741 aus unstable: Bugfix 214 Derselbe Bug tritt auch in Verbindung mit Einkaufsrechnungen auf, und verfaelscht die Bilanz, wenn mit einer Datumsmaske gesu cht wird --- SL/CA.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SL/CA.pm b/SL/CA.pm index a96386063..ac64c37fc 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -234,7 +234,7 @@ sub all_transactions { 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) @@ -248,7 +248,7 @@ sub all_transactions { 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) @@ -280,7 +280,7 @@ sub all_transactions { 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) @@ -294,7 +294,7 @@ sub all_transactions { 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) @@ -371,7 +371,7 @@ sub all_transactions { UNION ALL 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) @@ -386,7 +386,7 @@ sub all_transactions { UNION ALL 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) -- 2.20.1