From 64cbc2ca224a1710f64c7d4fcadd2b2b210418c8 Mon Sep 17 00:00:00 2001 From: Hystepik Date: Wed, 12 Feb 2025 10:32:35 +0100 Subject: [PATCH] fix to be more constant --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 4 ++-- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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);