mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Use isModEnabled
This commit is contained in:
@@ -187,7 +187,7 @@ if ($search_date_end && empty($search_date_endyear)) {
|
||||
$search_date_endday = $tmparray['mday'];
|
||||
}
|
||||
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
if (!isModEnabled('accounting')) {
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->socid > 0) {
|
||||
|
||||
@@ -429,7 +429,7 @@ class AccountingJournal extends CommonObject
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
if (empty($conf->asset->enabled)) {
|
||||
if (!isModEnabled('asset')) {
|
||||
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
|
||||
// require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php';
|
||||
// $asset = new Asset($this->db);
|
||||
|
||||
@@ -57,7 +57,7 @@ $search_date_end = dol_get_last_day($year_end, $month_end);
|
||||
$year_current = $year_start;
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
if (!isModEnabled('accounting')) {
|
||||
accessforbidden();
|
||||
}
|
||||
if ($user->socid > 0) {
|
||||
|
||||
Reference in New Issue
Block a user