Send Notification Without File when E-mail Template does'nt attach file

When we create an Email Template that does'nt require main file to be attached, we still send notification with an attached file, eg: when we send a notification when validating proposal it send proposal with attached file with mention NOT VALIDATED.
I added OR condition on checking pdf_path.
This commit is contained in:
Abdelaziz MISBAH 2022-06-07 13:11:30 +01:00
parent fc0f624445
commit a29aa48100

View File

@ -615,7 +615,7 @@ class Notify
$ref = dol_sanitizeFileName($newref);
$pdf_path = $dir_output."/".$ref.".pdf";
if (!dol_is_file($pdf_path)) {
if (!dol_is_file($pdf_path)||!$arraydefaultmessage->joinfiles) {
// We can't add PDF as it is not generated yet.
$filepdf = '';
} else {