mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-07 09:32:47 +01:00
Add PROFORMA_PDF_WITH_SUFFIX option
Use a suffix for proforma for the pdf name for example : C210200136_proforma.pdf
This commit is contained in:
@@ -256,10 +256,16 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$dir = $conf->commande->multidir_output[$conf->entity];
|
||||
$file = $dir."/SPECIMEN.pdf";
|
||||
} else {
|
||||
|
||||
// Possibility to use suffix for proforma
|
||||
if(!empty($conf->global->PROFORMA_PDF_WITH_SUFFIX)){
|
||||
$suffix = (GETPOST('model',2)=='proforma') ? $conf->global->PROFORMA_PDF_WITH_SUFFIX : '';
|
||||
}
|
||||
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$dir = $conf->commande->multidir_output[$object->entity]."/".$objectref;
|
||||
$file = $dir."/".$objectref.".pdf";
|
||||
}
|
||||
$file = $dir . "/" .$objectref.$suffix.".pdf";
|
||||
}
|
||||
|
||||
if (!file_exists($dir)) {
|
||||
if (dol_mkdir($dir) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user