From 6b76ebb4a68550d1bc709c7a5cbc49f2bf779b6b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 2 May 2007 11:00:08 +0000 Subject: [PATCH] =?utf8?q?Beim=20Speichern/Anlegen=20von=20Mahstufen=20m?= =?utf8?q?=C3=BCssen=20die=20Kundendaten=20vor=20dem=20Generieren=20der=20?= =?utf8?q?PDFs=20aus=20der=20Datenbank=20gelesen=20werden,=20damit=20nicht?= =?utf8?q?=20alle=20Mahnungen=20f=C3=BCr=20ein=20und=20denselben=20Kunden?= =?utf8?q?=20ausgegeben=20werden.=20Fix=20f=C3=BCr=20Bug=20631.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DN.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index 92881569f..008a538f1 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -159,9 +159,12 @@ sub save_dunning { ar.transdate, ar.duedate, paid, amount - paid AS open_amount, template AS formname, email_subject, email_body, email_attachment, da.fee, da.interest, da.transdate AS dunning_date, - da.duedate AS dunning_duedate - FROM ar LEFT JOIN dunning_config ON (dunning_config.id = ar.dunning_config_id) + da.duedate AS dunning_duedate, + c.name, c.street, c.zipcode, c.city, c.country, c.department_1, c.department_2 + FROM ar + LEFT JOIN dunning_config ON (dunning_config.id = ar.dunning_config_id) LEFT JOIN dunning da ON (ar.id = da.trans_id AND dunning_config.dunning_level = da.dunning_level) + LEFT JOIN customer c ON (ar.customer_id = c.id) WHERE ar.id IN (| . join(", ", map("?", @{ $form->{"inv_ids"} })) . qq|)|; -- 2.20.1