Revision 8c0aec94
Von Sven Schöling vor etwa 19 Jahren hinzugefügt
SL/CA.pm | ||
---|---|---|
234 | 234 |
|
235 | 235 |
UNION |
236 | 236 |
|
237 |
SELECT SUM(ac.sellprice) |
|
237 |
SELECT SUM(ac.qty * ac.sellprice)
|
|
238 | 238 |
FROM invoice ac |
239 | 239 |
JOIN ar a ON (ac.trans_id = a.id) |
240 | 240 |
JOIN parts p ON (ac.parts_id = p.id) |
... | ... | |
248 | 248 |
|
249 | 249 |
UNION |
250 | 250 |
|
251 |
SELECT SUM(ac.sellprice) |
|
251 |
SELECT SUM(ac.qty * ac.sellprice)
|
|
252 | 252 |
FROM invoice ac |
253 | 253 |
JOIN ap a ON (ac.trans_id = a.id) |
254 | 254 |
JOIN parts p ON (ac.parts_id = p.id) |
... | ... | |
280 | 280 |
|
281 | 281 |
UNION |
282 | 282 |
|
283 |
SELECT SUM(ac.sellprice) |
|
283 |
SELECT SUM(ac.qty * ac.sellprice)
|
|
284 | 284 |
FROM invoice ac |
285 | 285 |
JOIN ar a ON (ac.trans_id = a.id) |
286 | 286 |
JOIN parts p ON (ac.parts_id = p.id) |
... | ... | |
294 | 294 |
|
295 | 295 |
UNION |
296 | 296 |
|
297 |
SELECT SUM(ac.sellprice) |
|
297 |
SELECT SUM(ac.qty * ac.sellprice)
|
|
298 | 298 |
FROM invoice ac |
299 | 299 |
JOIN ap a ON (ac.trans_id = a.id) |
300 | 300 |
JOIN parts p ON (ac.parts_id = p.id) |
... | ... | |
371 | 371 |
UNION ALL |
372 | 372 |
|
373 | 373 |
SELECT a.id, a.invnumber, c.name, a.transdate, |
374 |
a.invoice, ac.sellprice, 'ar' as module |
|
374 |
a.invoice, ac.qty * ac.sellprice AS sellprice, 'ar' as module
|
|
375 | 375 |
FROM ar a |
376 | 376 |
JOIN invoice ac ON (ac.trans_id = a.id) |
377 | 377 |
JOIN parts p ON (ac.parts_id = p.id) |
... | ... | |
386 | 386 |
UNION ALL |
387 | 387 |
|
388 | 388 |
SELECT a.id, a.invnumber, v.name, a.transdate, |
389 |
a.invoice, ac.sellprice, 'ap' as module |
|
389 |
a.invoice, ac.qty * ac.sellprice AS sellprice, 'ap' as module
|
|
390 | 390 |
FROM ap a |
391 | 391 |
JOIN invoice ac ON (ac.trans_id = a.id) |
392 | 392 |
JOIN parts p ON (ac.parts_id = p.id) |
Auch abrufbar als: Unified diff
Fix fuer Bug 214 und seine Nebenwirkungen
Derselbe Bug tritt auch in Verbindung mit Einkaufsrechnungen auf, und verfaelscht die Bilanz, wenn mit einer Datumsmaske gesucht wird.