Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-08-29 11:34:18 +02:00
parent 0b362424e5
commit 2b706c7a60

View File

@ -68,10 +68,10 @@ if (GETPOST('subcat', 'alpha') === 'yes') {
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');
}
@ -256,7 +256,7 @@ if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) {
report_header($name, $namelink, $period, $periodlink, $description, $builddate, $exportlink, $tableparams, $calcmode);
if (!empty($conf->accounting->enabled) && $modecompta != 'BOOKKEEPING') {
if (isModEnabled('accounting') && $modecompta != 'BOOKKEEPING') {
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
}