diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 0b6380ca1b0..5f4c8453bab 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -514,7 +514,7 @@ $tabcond[27] = isModEnabled("societe");
$tabcond[28] = isModEnabled('holiday');
$tabcond[29] = isModEnabled('project');
$tabcond[30] = isModEnabled('label');
-//$tabcond[31]= !empty($conf->accounting->enabled);
+//$tabcond[31]= isModEnabled('accounting');
$tabcond[32] = (isModEnabled('holiday') || isModEnabled('hrm'));
$tabcond[33] = isModEnabled('hrm');
$tabcond[34] = isModEnabled('hrm');
@@ -2077,7 +2077,7 @@ if ($id > 0) {
} elseif (in_array($value, array('recuperableonly'))) {
$class = "center";
} elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') {
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
$tmpaccountingaccount = new AccountingAccount($db);
$tmpaccountingaccount->fetch(0, $valuetoshow, 1);
@@ -2486,7 +2486,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
print '';
} elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') {
print '
';
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
$fieldname = $value;
$accountancy_account = (!empty($obj->$fieldname) ? $obj->$fieldname : 0);
print $formaccounting->select_account($accountancy_account, '.'. $value, 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php
index c7242085024..f997c44ef6e 100644
--- a/htdocs/admin/fckeditor.php
+++ b/htdocs/admin/fckeditor.php
@@ -66,7 +66,7 @@ $conditions = array(
'PRODUCTDESC' => (isModEnabled("product") || isModEnabled("service")),
'DETAILS' => (isModEnabled('facture') || isModEnabled("propal") || isModEnabled('commande') || isModEnabled('supplier_proposal') || (isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")),
'USERSIGN' => 1,
- 'MAILING' => !empty($conf->mailing->enabled),
+ 'MAILING' => isModEnabled('mailing'),
'MAIL' => (isModEnabled('facture') || isModEnabled("propal") || isModEnabled('commande')),
'TICKET' => !empty($conf->ticket->enabled),
);
diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php
index f36559e4577..67448b0e304 100644
--- a/htdocs/asset/admin/setup.php
+++ b/htdocs/asset/admin/setup.php
@@ -531,7 +531,7 @@ if ($action == 'edit') {
}
} elseif ($val['type'] == 'accountancy_code') {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
$formaccounting = new FormAccounting($db);
print $formaccounting->select_account($selected, $constname, 1, null, 1, 1, 'minwidth150 maxwidth300', 1);
@@ -540,7 +540,7 @@ if ($action == 'edit') {
}
} elseif ($val['type'] == 'accountancy_category') {
$selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname);
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
print '';
// autosuggest from existing account types if found
print ' |