diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 7c0454a9afd..04e46e72e1b 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -39,10 +39,10 @@ $socid = GETPOST('socid', 'int'); if ($user->socid > 0) { $socid = $user->socid; } -if (!empty($conf->comptabilite->enabled)) { +if (isModEnabled('comptabilite')) { $result = restrictedArea($user, 'compta', '', '', 'resultat'); } -if (!empty($conf->accounting->enabled)) { +if (isModEnabled('accounting')) { $result = restrictedArea($user, 'accounting', '', '', 'comptarapport'); } @@ -231,7 +231,7 @@ if (!empty($modecompta)) { report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $moreparam, $calcmode); -if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') { +if (isModEnabled('accounting') && $modecompta != 'BOOKKEEPING') { print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1); }