diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 3bc5575189f..1182972f0bd 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -257,11 +257,13 @@ class pdf_einstein extends ModelePDFCommandes $file = $dir."/SPECIMEN.pdf"; } else { // Possibility to use suffix for proforma + $suffix = ''; if (!empty($conf->global->PROFORMA_PDF_WITH_SUFFIX)) { $suffix = (GETPOST('model', 2)=='proforma') ? $conf->global->PROFORMA_PDF_WITH_SUFFIX : ''; } $objectref = dol_sanitizeFileName($object->ref); + $suffix = dol_sanitizeFileName($suffix); $dir = $conf->commande->multidir_output[$object->entity]."/".$objectref; $file = $dir . "/" .$objectref.$suffix.".pdf"; }