X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDN.pm;h=cf800dac5a0feb2a549d52e1f3624cf4c41bcca5;hb=cc978962a88cd9f1cf15ac9d4a28db76432f8542;hp=51ab07b3c4be8a3b1d59db407a4c8a2214f4f730;hpb=97422880ec1448b61c609c3d2a6257c1f5d582bf;p=kivitendo-erp.git diff --git a/SL/DN.pm b/SL/DN.pm index 51ab07b3c..cf800dac5 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -904,7 +904,7 @@ sub print_dunning { delete $form->{tmpfile}; push @{ $form->{DUNNING_PDFS} }, $filename; - push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'filename' => "${spool}/$filename", + push @{ $form->{DUNNING_PDFS_EMAIL} }, { 'path' => "${spool}/$filename", 'name' => $form->get_formname_translation('dunning') . "_${dunning_id}.pdf" }; $form->get_employee_data('prefix' => 'employee', 'id' => $form->{employee_id}); @@ -1033,6 +1033,13 @@ sub set_customer_cvars { translation_type => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), language_id => $form->{language_id}, allow_fallback => 1); + if ($form->{cp_id}) { + $custom_variables = CVar->get_custom_variables(dbh => $form->get_standard_dbh, + module => 'Contacts', + trans_id => $form->{cp_id}); + $form->{"cp_cvar_$_->{name}"} = $_->{value} for @{ $custom_variables }; + } + } 1;