diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
index 5b9a572736b..e4ea143d39d 100644
--- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php
@@ -388,7 +388,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
// Incoterm
- if (!empty($conf->incoterm->enabled)) {
+ if (isModEnabled('incoterm')) {
$desc_incoterms = $object->getIncotermsForPDF();
if ($desc_incoterms) {
$tab_top -= 2;
diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php
index 0fbdc85924c..86dcc2a43fc 100644
--- a/htdocs/delivery/card.php
+++ b/htdocs/delivery/card.php
@@ -52,7 +52,7 @@ if (isModEnabled('project')) {
// Load translation files required by the page
$langs->loadLangs(array('bills', 'deliveries', 'orders', 'sendings'));
-if (!empty($conf->incoterm->enabled)) {
+if (isModEnabled('incoterm')) {
$langs->load('incoterm');
}
@@ -186,7 +186,7 @@ if ($action == 'setdate_delivery' && $user->rights->expedition->delivery->creer)
if ($result < 0) {
$mesg = '
';
print '| ';
print $langs->trans('IncotermLabel');
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 6d31298e3c2..17173088eed 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -65,7 +65,7 @@ if (isModEnabled('project')) {
// Load translation files required by the page
$langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal'));
-if (!empty($conf->incoterm->enabled)) {
+if (isModEnabled('incoterm')) {
$langs->load('incoterm');
}
if (isModEnabled('productbatch')) {
@@ -164,7 +164,7 @@ if (empty($reshook)) {
}
// Set incoterm
- if ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
+ if ($action == 'set_incoterms' && isModEnabled('incoterm')) {
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
}
@@ -1009,7 +1009,7 @@ if ($action == 'create') {
// Incoterms
- if (!empty($conf->incoterm->enabled)) {
+ if (isModEnabled('incoterm')) {
print ' | ';
print ' | ';
print '';
@@ -1982,7 +1982,7 @@ if ($action == 'create') {
print ' | ';
// Incoterms
- if (!empty($conf->incoterm->enabled)) {
+ if (isModEnabled('incoterm')) {
print '';
print '| ';
print $langs->trans('IncotermLabel');
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 7619ef140f8..769642d305a 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -161,7 +161,7 @@ if (empty($reshook)) {
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
- } elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
+ } elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) {
// Set incoterm
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
if ($result < 0) {
@@ -523,7 +523,7 @@ if ($id > 0 || !empty($ref)) {
// TODO How record was recorded OrderMode (llx_c_input_method)
// Incoterms
- if (!empty($conf->incoterm->enabled)) {
+ if (isModEnabled('incoterm')) {
print ' | ';
print '| ';
print $langs->trans('IncotermLabel');
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 5e3eb8d7890..799539bb99e 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -65,7 +65,7 @@ if (isModEnabled('variants')) {
// Load translation files required by the page
$langs->loadLangs(array('admin', 'orders', 'sendings', 'companies', 'bills', 'propal', 'receptions', 'supplier_proposal', 'deliveries', 'products', 'stocks', 'productbatch'));
-if (!empty($conf->incoterm->enabled)) {
+if (isModEnabled('incoterm')) {
$langs->load('incoterm');
}
@@ -1777,7 +1777,7 @@ if ($action == 'create') {
}
// Incoterms
- if (!empty($conf->incoterm->enabled)) {
+ if (isModEnabled('incoterm')) {
$fkincoterms = (!empty($object->fk_incoterms) ? $object->fk_incoterms : ($socid > 0 ? $societe->fk_incoterms : ''));
$locincoterms = (!empty($object->location_incoterms) ? $object->location_incoterms : ($socid > 0 ? $societe->location_incoterms : ''));
print ' | ';
@@ -2290,7 +2290,7 @@ if ($action == 'create') {
print ' ';
// Incoterms
- if (!empty($conf->incoterm->enabled)) {
+ if (isModEnabled('incoterm')) {
print '';
print '| ';
print $langs->trans('IncotermLabel');
@@ -2373,7 +2373,7 @@ if ($action == 'create') {
print ' | ';
// Margin Infos
- /*if (!empty($conf->margin->enabled)) {
+ /*if (isModEnabled('margin')) {
$formmargin->displayMarginInfos($object);
}*/
|
|
|
|