contract - use multidir_output
This commit is contained in:
parent
4f2e7c51fc
commit
468f40743d
@ -219,7 +219,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||||
|
|
||||||
if ($conf->contrat->dir_output)
|
if ($conf->contrat->multidir_output[$object->entity])
|
||||||
{
|
{
|
||||||
// If $object is id instead of object
|
// If $object is id instead of object
|
||||||
if (!is_object($object))
|
if (!is_object($object))
|
||||||
@ -236,7 +236,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$dir = $conf->contrat->dir_output;
|
$dir = $conf->contrat->multidir_output[$object->entity];
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref;
|
if (!preg_match('/specimen/i', $objectref)) $dir .= "/".$objectref;
|
||||||
$file = $dir."/".$objectref.".odt";
|
$file = $dir."/".$objectref.".odt";
|
||||||
|
|||||||
@ -195,7 +195,7 @@ class pdf_strato extends ModelePDFContract
|
|||||||
$file = $dir."/SPECIMEN.pdf";
|
$file = $dir."/SPECIMEN.pdf";
|
||||||
} else {
|
} else {
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->contrat->dir_output."/".$objectref;
|
$dir = $conf->contrat->multidir_output[$object->entity]."/".$objectref;
|
||||||
$file = $dir."/".$objectref.".pdf";
|
$file = $dir."/".$objectref.".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user