From 2cb10c92a906996ae3cd2e53b0ba20e183faadd1 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Wed, 3 Oct 2007 13:47:36 +0000 Subject: [PATCH] =?utf8?q?Bug=20760:=20Mahnungen=20drucken:=20Kunden=20Kon?= =?utf8?q?takt=20eingef=C3=BCgt.=20Betr.=20Tabelle:=20contacts,=20Template?= =?utf8?q?variablen=20cp=5F*?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DN.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index 061908a5c..125e33ca1 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -686,7 +686,7 @@ sub print_dunning { dcfg.email_subject, dcfg.email_body, dcfg.email_attachment, ar.transdate, ar.duedate, ar.customer_id, - ar.invnumber, ar.ordnumber, + ar.invnumber, ar.ordnumber, ar.cp_id, ar.amount, ar.netamount, ar.paid, ar.amount - ar.paid AS open_amount, ar.amount - ar.paid + da.fee + da.interest AS linetotal @@ -712,10 +712,13 @@ sub print_dunning { $query = qq|SELECT c.id AS customer_id, c.name, c.street, c.zipcode, c.city, - c.country, c.department_1, c.department_2, c.email, c.customernumber + c.country, c.department_1, c.department_2, c.email, c.customernumber, + -- contact information + co.* FROM dunning d - LEFT JOIN ar ON (d.trans_id = ar.id) - LEFT JOIN customer c ON (ar.customer_id = c.id) + LEFT JOIN ar ON (d.trans_id = ar.id) + LEFT JOIN customer c ON (ar.customer_id = c.id) + LEFT JOIN contacts co ON (ar.cp_id = co.cp_id) WHERE (d.dunning_id = ?) LIMIT 1|; $ref = selectfirst_hashref_query($form, $dbh, $query, $dunning_id); -- 2.20.1