diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9d95f466254..e4e85ad053e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1744,6 +1744,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } // Refresh value of MAIN_IHM_PARAMS_REV before forging the parameter line. if (GETPOST('dol_resetcache')) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); } diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index a4ab7a26393..614d9d3c39f 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1278,8 +1278,8 @@ foreach ($listofreferent as $key => $value) { $filedir = $conf->fournisseur->commande->multidir_output[$element->entity].'/'.dol_sanitizeFileName($element->ref); } elseif ($element_doc === 'invoice_supplier') { $element_doc = 'facture_fournisseur'; - $filename = get_exdir($element->id, 2, 0, 0, $element, 'product').dol_sanitizeFileName($element->ref); - $filedir = $conf->fournisseur->facture->multidir_output[$element->entity].'/'.get_exdir($element->id, 2, 0, 0, $element, 'invoice_supplier').dol_sanitizeFileName($element->ref); + $filename = get_exdir($element->id, 2, 0, 0, $element, 'invoice_supplier').dol_sanitizeFileName($element->ref); + $filedir = $conf->fournisseur->facture->multidir_output[$element->entity].'/'.$filename; } print '
';