From 2b706c7a6006fcc6d60a1b4d135bbbdfa2ad96cd Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Aug 2022 11:34:18 +0200 Subject: [PATCH] Use isModEnabled --- htdocs/compta/stats/casoc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 50f326dc252..f02fb24dc7b 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -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); }