Use isModEnabled
This commit is contained in:
parent
e2af7238f4
commit
5b810db990
@ -168,10 +168,10 @@ foreach ($allparams as $key => $value) {
|
|||||||
if ($user->socid > 0) {
|
if ($user->socid > 0) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
if (!empty($conf->comptabilite->enabled)) {
|
if (isModEnabled('comptabilite')) {
|
||||||
$result = restrictedArea($user, 'compta', '', '', 'resultat');
|
$result = restrictedArea($user, 'compta', '', '', 'resultat');
|
||||||
}
|
}
|
||||||
if (!empty($conf->accounting->enabled)) {
|
if (isModEnabled('accounting')) {
|
||||||
$result = restrictedArea($user, 'accounting', '', '', 'comptarapport');
|
$result = restrictedArea($user, 'accounting', '', '', 'comptarapport');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ if ($date_end == dol_time_plus_duree($date_start, 1, 'y') - 1) {
|
|||||||
|
|
||||||
report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink, $tableparams, $calcmode);
|
report_header($name, '', $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);
|
print info_admin($langs->trans("WarningReportNotReliable"), 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user