From a9b9812b7e7ffdf4710ff9e87cede29bb190613a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 8 Mar 2023 21:39:05 +0100 Subject: [PATCH] try to use function --- htdocs/commande/class/commande.class.php | 1 + .../core/modules/commande/doc/pdf_eratosthene.modules.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 86fcfbea1ad..4a6a197aa79 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3960,6 +3960,7 @@ class Commande extends CommonOrder $this->id = 0; $this->ref = 'SPECIMEN'; $this->specimen = 1; + $this->entity = $conf->entity; $this->socid = 1; $this->date = time(); $this->date_lim_reglement = $this->date + 3600 * 24 * 30; diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 78b3fa24a33..c035b190693 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -296,18 +296,18 @@ class pdf_eratosthene extends ModelePDFCommandes - if ($conf->commande->multidir_output[$conf->entity]) { + if (getMultidirOutput($object)) { $object->fetch_thirdparty(); $deja_regle = 0; // Definition of $dir and $file if ($object->specimen) { - $dir = $conf->commande->multidir_output[$conf->entity]; + $dir = getMultidirOutput($object); $file = $dir."/SPECIMEN.pdf"; } else { $objectref = dol_sanitizeFileName($object->ref); - $dir = $conf->commande->multidir_output[$object->entity]."/".$objectref; + $dir = getMultidirOutput($object)."/".$objectref; $file = $dir."/".$objectref.".pdf"; }