| '.$langs->trans("ProductAccountancySellCode").' | ';
print '';
@@ -2562,7 +2562,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ' ';
print '';
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
// Accountancy_code_sell
print '| '.$langs->trans("ProductAccountancySellCode").' | ';
print '';
@@ -2984,7 +2984,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ' | | ';
print $langs->trans("ProductAccountancySellCode");
print ' | ';
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
if (!empty($object->accountancy_code_sell)) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch('', $object->accountancy_code_sell, 1);
@@ -3000,7 +3000,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print ' | | ';
print $langs->trans("ProductAccountancyBuyCode");
print ' | ';
- if (!empty($conf->accounting->enabled)) {
+ if (isModEnabled('accounting')) {
if (!empty($object->accountancy_code_buy)) {
$accountingaccount2 = new AccountingAccount($db);
$accountingaccount2->fetch('', $object->accountancy_code_buy, 1);
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 58a8d973fe6..54decc3f8ea 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2711,10 +2711,10 @@ class Societe extends CommonObject
if (!empty($this->code_fournisseur) && $this->fournisseur) {
$label2 .= ' '.$langs->trans('SupplierCode').': '.$this->code_fournisseur;
}
- if (!empty($conf->accounting->enabled) && ($this->client == 1 || $this->client == 3)) {
+ if (isModEnabled('accounting') && ($this->client == 1 || $this->client == 3)) {
$label2 .= ' '.$langs->trans('CustomerAccountancyCode').': '.($this->code_compta ? $this->code_compta : $this->code_compta_client);
}
- if (!empty($conf->accounting->enabled) && $this->fournisseur) {
+ if (isModEnabled('accounting') && $this->fournisseur) {
$label2 .= ' '.$langs->trans('SupplierAccountancyCode').': '.$this->code_compta_fournisseur;
}
$label .= ($label2 ? ' '.$label2 : '').'';
diff --git a/htdocs/stripe/charge.php b/htdocs/stripe/charge.php
index eb30537438c..747644edbf5 100644
--- a/htdocs/stripe/charge.php
+++ b/htdocs/stripe/charge.php
@@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
-if (!empty($conf->accounting->enabled)) {
+if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
}
diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php
index a33c183a1e7..5d456856f79 100644
--- a/htdocs/stripe/payout.php
+++ b/htdocs/stripe/payout.php
@@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
-if (!empty($conf->accounting->enabled)) {
+if (isModEnabled('accounting')) {
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
}
| |