fix from your comments

This commit is contained in:
iouston 2022-04-05 15:59:38 +02:00 committed by GitHub
parent 48f0c863cc
commit 0d9d2f7504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";
}