From: Stephan Köhler Date: Sat, 7 Jan 2006 14:17:11 +0000 (+0000) Subject: Merge von 741 aus unstable: Bugfix 214 X-Git-Tag: release-2.2.0~46 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1c11922e79195320077a73d4cf215c8882031aa0;p=kivitendo-erp.git 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 --- 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)