diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 76829cc158c..f2e3a5d1e5c 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -644,8 +644,8 @@ class pdf_einstein extends ModelePDFCommandes if (getDolGlobalString("MAIN_INFO_ORDER_TERMSOFSALE") && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_ORDER')) { $termsofsalefilename = getDolGlobalString('MAIN_INFO_ORDER_TERMSOFSALE'); $termsofsale = $conf->order->dir_output.'/'.$termsofsalefilename; - if (!empty($conf->order->multidir_output[$object->entity])) { - $termsofsale = $conf->order->multidir_output[$object->entity].'/'.$termsofsalefilename; + if (!empty($conf->order->multidir_output[$conf->entity])) { + $termsofsale = $conf->order->multidir_output[$conf->entity].'/'.$termsofsalefilename; } if (file_exists($termsofsale) && is_readable($termsofsale)) { $pagecount = $pdf->setSourceFile($termsofsale); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 3470b4a295b..4656adb3f67 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -867,8 +867,8 @@ class pdf_eratosthene extends ModelePDFCommandes if (getDolGlobalString("MAIN_INFO_ORDER_TERMSOFSALE") && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_ORDER')) { $termsofsalefilename = getDolGlobalString('MAIN_INFO_ORDER_TERMSOFSALE'); $termsofsale = $conf->order->dir_output.'/'.$termsofsalefilename; - if (!empty($conf->order->multidir_output[$object->entity])) { - $termsofsale = $conf->order->multidir_output[$object->entity].'/'.$termsofsalefilename; + if (!empty($conf->order->multidir_output[$conf->entity])) { + $termsofsale = $conf->order->multidir_output[$conf->entity].'/'.$termsofsalefilename; } if (file_exists($termsofsale) && is_readable($termsofsale)) { $pagecount = $pdf->setSourceFile($termsofsale);