Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-08-29 11:24:48 +02:00
parent acc1c519cc
commit 10e41b6c09

View File

@ -50,10 +50,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');
}