diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 44f7e00bdce..ca99f86d5ed 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -61,7 +61,7 @@ if (isModEnabled('variants')) { // Load translation files required by the page $langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'sendings', 'other')); -if (!empty($conf->incoterm->enabled)) { +if (isModEnabled('incoterm')) { $langs->load('incoterm'); } if (isModEnabled('margin')) { @@ -375,7 +375,7 @@ if (empty($reshook)) { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled) && $usercancreate) { + } elseif ($action == 'set_incoterms' && isModEnabled('incoterm') && $usercancreate) { // Set incoterm $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); } elseif ($action == 'add' && $usercancreate) { @@ -1870,7 +1870,7 @@ if ($action == 'create') { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print ''; print ''; print ''; @@ -2655,7 +2655,7 @@ if ($action == 'create') { } // Incoterms - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { print ''; print '
'; print $langs->trans('IncotermLabel'); diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 2d79aa298b6..41dec1e8fb7 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -1276,7 +1276,7 @@ abstract class CommonInvoice extends CommonObject dol_syslog("The payment has been created for invoice id " . $this->id); } - if (!$errorforinvoice && !empty($conf->banque->enabled)) { + if (!$errorforinvoice && isModEnabled('banque')) { dol_syslog('* Add payment to bank'); $bankaccountid = 0; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 2b89f229730..51994fb3e42 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -363,7 +363,7 @@ class pdf_einstein extends ModelePDFCommandes // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index df28616276d..e0c8425073d 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -398,7 +398,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2; diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index 550957511ba..8ec59774cc3 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -351,7 +351,7 @@ class pdf_storm extends ModelePDFDeliveryOrder // Incoterm $height_incoterms = 0; - if (!empty($conf->incoterm->enabled)) { + if (isModEnabled('incoterm')) { $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { $tab_top -= 2;