From 4c8c615a3268dc328f748cc8efe20fc2dc6cb8c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 12 Nov 2019 09:31:42 +0100 Subject: [PATCH] =?utf8?q?Bugfix=20(teil)=20#406=20abzurechnender=20Betrag?= =?utf8?q?=20bei=20Auftr=C3=A4gen=20manchmal=20falsch=20falls=20Gutschrift?= =?utf8?q?en?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit S.a. Kommentar redmine --- SL/OE.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SL/OE.pm b/SL/OE.pm index ab0eb9444..1d064505b 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -100,6 +100,12 @@ sub transactions { FROM record_links rl1 LEFT JOIN record_links rl2 ON (rl1.to_table = rl2.from_table AND rl1.to_id = rl2.from_id) WHERE rl1.from_table = 'oe' AND rl2.to_table = 'ar' + UNION + SELECT rl1.from_id, rl3.to_id + FROM record_links rl1 + JOIN record_links rl2 ON (rl1.to_table = rl2.from_table AND rl1.to_id = rl2.from_id) + JOIN record_links rl3 ON (rl2.to_table = rl3.from_table AND rl2.to_id = rl3.from_id) + WHERE (rl1.from_table = 'oe') AND rl2.to_table = 'ar' ) rl LEFT JOIN ar ON ar.id = rl.to_id -- 2.20.1