Use isModEnabled

This commit is contained in:
Alexandre SPANGARO 2022-08-24 10:34:19 +02:00
parent 282c0d9f13
commit 8f41a59fce
3 changed files with 4 additions and 4 deletions

View File

@ -187,7 +187,7 @@ if ($search_date_end && empty($search_date_endyear)) {
$search_date_endday = $tmparray['mday']; $search_date_endday = $tmparray['mday'];
} }
if (empty($conf->accounting->enabled)) { if (!isModEnabled('accounting')) {
accessforbidden(); accessforbidden();
} }
if ($user->socid > 0) { if ($user->socid > 0) {

View File

@ -429,7 +429,7 @@ class AccountingJournal extends CommonObject
{ {
global $conf, $langs; global $conf, $langs;
if (empty($conf->asset->enabled)) { if (!isModEnabled('asset')) {
return array(); return array();
} }
@ -867,7 +867,7 @@ class AccountingJournal extends CommonObject
} }
} }
// //
// if (!$error_for_line && !empty($conf->asset->enabled) && $this->nature == 1 && $bookkeeping->fk_doc > 0) { // if (!$error_for_line && isModEnabled('asset') && $this->nature == 1 && $bookkeeping->fk_doc > 0) {
// // Set last cumulative depreciation // // Set last cumulative depreciation
// require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php'; // require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php';
// $asset = new Asset($this->db); // $asset = new Asset($this->db);

View File

@ -57,7 +57,7 @@ $search_date_end = dol_get_last_day($year_end, $month_end);
$year_current = $year_start; $year_current = $year_start;
// Security check // Security check
if (empty($conf->accounting->enabled)) { if (!isModEnabled('accounting')) {
accessforbidden(); accessforbidden();
} }
if ($user->socid > 0) { if ($user->socid > 0) {