From ed7f45bdd3a451833fdbc1d842ca78045d67d0fa Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Aug 2022 11:56:25 +0200 Subject: [PATCH] Use isModEnabled --- htdocs/compta/bank/bankentries_list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 70f1959ab54..543750c16a7 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -361,7 +361,7 @@ if (GETPOST('save') && !$cancel && !empty($user->rights->banque->modifier)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors'); } - /*if (! empty($conf->accounting->enabled) && (empty($search_accountancy_code) || $search_accountancy_code == '-1')) + /*if (isModEnabled('accounting') && (empty($search_accountancy_code) || $search_accountancy_code == '-1')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AccountAccounting")), null, 'errors'); $error++; @@ -875,7 +875,7 @@ if ($resql) { print ''.$langs->trans("BankAccount").''; print ''.$langs->trans("Debit").''; print ''.$langs->trans("Credit").''; - /*if (! empty($conf->accounting->enabled)) + /*if (isModEnabled('accounting')) { print ''; print $langs->trans("AccountAccounting"); @@ -910,7 +910,7 @@ if ($resql) { //} print ''; print ''; - /*if (! empty($conf->accounting->enabled)) + /*if (isModEnabled('accounting')) { print ''; print $formaccounting->select_account($search_accountancy_code, 'search_accountancy_code', 1, null, 1, 1, ''); @@ -1019,9 +1019,9 @@ if ($resql) { $moreforfilter .= ''; $moreforfilter .= ''; - if (!empty($conf->categorie->enabled)) { + if (isModEnabled('categorie')) { // Categories - if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { + if (isModEnabled('categorie') && !empty($user->rights->categorie->lire)) { $langs->load('categories'); // Bank line