Use isModEnabled
This commit is contained in:
parent
c464cd7d37
commit
fee02fa632
@ -388,7 +388,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||||
|
|
||||||
// Incoterm
|
// Incoterm
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
$desc_incoterms = $object->getIncotermsForPDF();
|
$desc_incoterms = $object->getIncotermsForPDF();
|
||||||
if ($desc_incoterms) {
|
if ($desc_incoterms) {
|
||||||
$tab_top -= 2;
|
$tab_top -= 2;
|
||||||
|
|||||||
@ -52,7 +52,7 @@ if (isModEnabled('project')) {
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('bills', 'deliveries', 'orders', 'sendings'));
|
$langs->loadLangs(array('bills', 'deliveries', 'orders', 'sendings'));
|
||||||
|
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
$langs->load('incoterm');
|
$langs->load('incoterm');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ if ($action == 'setdate_delivery' && $user->rights->expedition->delivery->creer)
|
|||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$mesg = '<div class="error">'.$object->error.'</div>';
|
$mesg = '<div class="error">'.$object->error.'</div>';
|
||||||
}
|
}
|
||||||
} elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
|
} elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) {
|
||||||
// Set incoterm
|
// Set incoterm
|
||||||
$result = $object->setIncoterms((int) GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
$result = $object->setIncoterms((int) GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||||
}
|
}
|
||||||
@ -451,7 +451,7 @@ if ($action == 'create') {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||||
print $langs->trans('IncotermLabel');
|
print $langs->trans('IncotermLabel');
|
||||||
|
|||||||
@ -65,7 +65,7 @@ if (isModEnabled('project')) {
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal'));
|
$langs->loadLangs(array("sendings", "companies", "bills", 'deliveries', 'orders', 'stocks', 'other', 'propal'));
|
||||||
|
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
$langs->load('incoterm');
|
$langs->load('incoterm');
|
||||||
}
|
}
|
||||||
if (isModEnabled('productbatch')) {
|
if (isModEnabled('productbatch')) {
|
||||||
@ -164,7 +164,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set incoterm
|
// 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'));
|
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1009,7 +1009,7 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>';
|
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $object->label_incoterms, 1).'</label></td>';
|
||||||
print '<td colspan="3" class="maxwidthonsmartphone">';
|
print '<td colspan="3" class="maxwidthonsmartphone">';
|
||||||
@ -1982,7 +1982,7 @@ if ($action == 'create') {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||||
print $langs->trans('IncotermLabel');
|
print $langs->trans('IncotermLabel');
|
||||||
|
|||||||
@ -161,7 +161,7 @@ if (empty($reshook)) {
|
|||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
} elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) {
|
} elseif ($action == 'set_incoterms' && isModEnabled('incoterm')) {
|
||||||
// Set incoterm
|
// Set incoterm
|
||||||
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
$result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha'));
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@ -523,7 +523,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
// TODO How record was recorded OrderMode (llx_c_input_method)
|
// TODO How record was recorded OrderMode (llx_c_input_method)
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||||
print $langs->trans('IncotermLabel');
|
print $langs->trans('IncotermLabel');
|
||||||
|
|||||||
@ -65,7 +65,7 @@ if (isModEnabled('variants')) {
|
|||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('admin', 'orders', 'sendings', 'companies', 'bills', 'propal', 'receptions', 'supplier_proposal', 'deliveries', 'products', 'stocks', 'productbatch'));
|
$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');
|
$langs->load('incoterm');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1777,7 +1777,7 @@ if ($action == 'create') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
$fkincoterms = (!empty($object->fk_incoterms) ? $object->fk_incoterms : ($socid > 0 ? $societe->fk_incoterms : ''));
|
$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 : ''));
|
$locincoterms = (!empty($object->location_incoterms) ? $object->location_incoterms : ($socid > 0 ? $societe->location_incoterms : ''));
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -2290,7 +2290,7 @@ if ($action == 'create') {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled)) {
|
if (isModEnabled('incoterm')) {
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||||
print $langs->trans('IncotermLabel');
|
print $langs->trans('IncotermLabel');
|
||||||
@ -2373,7 +2373,7 @@ if ($action == 'create') {
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
// Margin Infos
|
// Margin Infos
|
||||||
/*if (!empty($conf->margin->enabled)) {
|
/*if (isModEnabled('margin')) {
|
||||||
$formmargin->displayMarginInfos($object);
|
$formmargin->displayMarginInfos($object);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user