From 105ec63eafe86ae8a89685d9f1e3f57c4e9f1c5b Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Mon, 3 Mar 2025 15:20:39 +0100 Subject: [PATCH] Debug v21 for multicompany --- htdocs/ecm/class/ecmfiles.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 28db17eceb0..0bd44eceb31 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -1009,9 +1009,9 @@ class EcmFiles extends CommonObject if ($option) { if ($option == 'facture_fournisseur') { - $tmppath = preg_replace('/^fournisseur\/facture\//', '', $this->filepath); + $tmppath = preg_replace('/^(\d+\/)?fournisseur\/facture\//', '', $this->filepath); } elseif ($option == 'commande_fournisseur') { - $tmppath = preg_replace('/^fournisseur\/commande\//', '', $this->filepath); + $tmppath = preg_replace('/^(\d+\/)?fournisseur\/commande\//', '', $this->filepath); } else { if ((int) $this->entity > 1) { // Remove the part "entityid/commande/" into "entityid/commande/REFXXX" to get only the ref