Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-08-29 11:24:44 +02:00
parent 78431e0d66
commit acc1c519cc

View File

@ -48,10 +48,10 @@ $date_endyear = GETPOST('date_endyear');
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');
}