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});
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;