X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDN.pm;h=b29cf51a27eb0cf146651b8c3bebc54077a3a59e;hb=a6ce2c7f3f7ae10f7065fb86121c8d11049617ee;hp=b42fc5caea9cdf4ab6ef4b027b12dc32a536e82c;hpb=f7b15d4334848fad1bcd0b569eff5139f9a6ba4d;p=kivitendo-erp.git diff --git a/SL/DN.pm b/SL/DN.pm index b42fc5cae..b29cf51a2 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -399,6 +399,7 @@ sub send_email { my $template = SL::Template::create(type => 'PlainText', form => $form, myconfig => $myconfig); my $mail = Mailer->new(); + $mail->{bcc} = $form->get_bcc_defaults($myconfig, $form->{bcc}); $mail->{from} = $myconfig->{email}; $mail->{to} = $ref->{recipient}; $mail->{subject} = $template->parse_block($ref->{email_subject}); @@ -804,6 +805,7 @@ sub print_dunning { ar.transdate, ar.duedate, ar.customer_id, ar.invnumber, ar.ordnumber, ar.cp_id, ar.amount, ar.netamount, ar.paid, + ar.employee_id, ar.salesman_id, (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, @@ -834,7 +836,7 @@ sub print_dunning { c.country, c.department_1, c.department_2, c.email, c.customernumber, c.greeting, c.contact, c.phone, c.fax, c.homepage, c.email, c.taxincluded, c.business_id, c.taxnumber, c.iban, - c,ustid, e.name as salesman_name, + c.ustid, co.* FROM dunning d LEFT JOIN ar ON (d.trans_id = ar.id) @@ -904,6 +906,9 @@ sub print_dunning { push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${spool}/$filename", 'name' => $form->get_formname_translation('dunning') . "_${dunning_id}.pdf" }; + $form->get_employee_data('prefix' => 'employee', 'id' => $form->{employee_id}); + $form->get_employee_data('prefix' => 'salesman', 'id' => $form->{salesman_id}); + $form->parse_template($myconfig); $main::lxdebug->leave_sub();