@@ -85,7 +85,7 @@ if (!$sortorder) {
}
// Security check
-if (empty($conf->accounting->enabled)) {
+if (!isModEnabled('accounting')) {
accessforbidden();
if ($user->socid > 0) {
@@ -104,7 +104,7 @@ $accountingAccount = new AccountingAccount($db);
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');