Revision 4c8c615a
Von Jan Büren vor etwa 5 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
100 | 100 |
FROM record_links rl1 |
101 | 101 |
LEFT JOIN record_links rl2 ON (rl1.to_table = rl2.from_table AND rl1.to_id = rl2.from_id) |
102 | 102 |
WHERE rl1.from_table = 'oe' AND rl2.to_table = 'ar' |
103 |
UNION |
|
104 |
SELECT rl1.from_id, rl3.to_id |
|
105 |
FROM record_links rl1 |
|
106 |
JOIN record_links rl2 ON (rl1.to_table = rl2.from_table AND rl1.to_id = rl2.from_id) |
|
107 |
JOIN record_links rl3 ON (rl2.to_table = rl3.from_table AND rl2.to_id = rl3.from_id) |
|
108 |
WHERE (rl1.from_table = 'oe') AND rl2.to_table = 'ar' |
|
103 | 109 |
) rl |
104 | 110 |
LEFT JOIN ar ON ar.id = rl.to_id |
105 | 111 |
|
Auch abrufbar als: Unified diff
Bugfix (teil) #406 abzurechnender Betrag bei Aufträgen manchmal falsch falls Gutschriften
S.a. Kommentar redmine