From: Udo Spallek Date: Wed, 3 Oct 2007 13:47:36 +0000 (+0000) Subject: Bug 760: Mahnungen drucken: Kunden Kontakt eingefügt. Betr. Tabelle: contacts, Templa... X-Git-Tag: release-2.6.0beta1~485 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2cb10c92a906996ae3cd2e53b0ba20e183faadd1;p=kivitendo-erp.git Bug 760: Mahnungen drucken: Kunden Kontakt eingefügt. Betr. Tabelle: contacts, Templatevariablen cp_* --- 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);