Abteilung an Druckvorlage in Mahnungen übergeben
authorJan Büren <jan@kivitendo-premium.de>
Thu, 29 Sep 2016 10:56:17 +0000 (12:56 +0200)
committerJan Büren <jan@kivitendo-premium.de>
Thu, 29 Sep 2016 10:56:17 +0000 (12:56 +0200)
SL/DN.pm

index 8191c5c..5dd6fe9 100644 (file)
--- a/SL/DN.pm
+++ b/SL/DN.pm
@@ -799,7 +799,8 @@ sub print_dunning {
          ar.transdate,       ar.duedate,      ar.customer_id,
          ar.invnumber,       ar.ordnumber,    ar.cp_id,
          ar.amount,          ar.netamount,    ar.paid,
-         (SELECT cu.name FROM currencies cu WHERE cu.id=ar.currency_id) AS curr,
+         (SELECT cu.name FROM currencies cu WHERE cu.id = ar.currency_id) AS curr,
+         (SELECT description from department WHERE id = ar.department_id) AS department,
          ar.amount - ar.paid AS open_amount,
          ar.amount - ar.paid + da.fee + da.interest AS linetotal