Use isModEnabled
This commit is contained in:
parent
92205f42a4
commit
8c14377ecc
@ -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 '<tr class="field_incoterm_id">';
|
||||
print '<td class="titlefieldcreate"><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1).'</label></td>';
|
||||
print '<td class="valuefieldcreate maxwidthonsmartphone">';
|
||||
@ -2655,7 +2655,7 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled)) {
|
||||
if (isModEnabled('incoterm')) {
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('IncotermLabel');
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user