diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 4110ba98e1b..05831c5dd97 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -83,7 +83,7 @@ if (! empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH)) { $rootfordata = DOL_DATA_ROOT; $rootforuser = DOL_DATA_ROOT; // If multicompany module is enabled, we redefine the root of data -if (!empty($conf->multicompany->enabled) && !empty($conf->entity) && $conf->entity > 1) { +if (isModEnabled('multicompany') && !empty($conf->entity) && $conf->entity > 1) { $rootfordata .= '/'.$conf->entity; } $conf->expensereport->dir_output = $rootfordata.'/expensereport';