FIX issue 15659 : Missing test if conf is enabled
This commit is contained in:
parent
58e33c59f4
commit
7161ca9e70
@ -1542,12 +1542,12 @@ else
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
// Supplier
|
// Supplier
|
||||||
//if ($object->fournisseur) {
|
if (!empty($conf->fournisseur->enabled)) {
|
||||||
print '<tr class="visibleifsupplier"><td class="toptd">'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td><td colspan="3">';
|
print '<tr class="visibleifsupplier"><td class="toptd">'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td><td colspan="3">';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1);
|
||||||
print $form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, null, "90%");
|
print $form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, null, "90%");
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
@ -2180,18 +2180,20 @@ else
|
|||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Supplier
|
// Supplier
|
||||||
|
if (!empty($conf->fournisseur->enabled)) {
|
||||||
print '<tr class="visibleifsupplier"><td>'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td>';
|
print '<tr class="visibleifsupplier"><td>'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1);
|
||||||
$c = new Categorie($db);
|
$c = new Categorie($db);
|
||||||
$cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER);
|
$cats = $c->containing($object->id, Categorie::TYPE_SUPPLIER);
|
||||||
$arrayselected = array();
|
$arrayselected = array();
|
||||||
foreach ($cats as $cat) {
|
foreach($cats as $cat) {
|
||||||
$arrayselected[] = $cat->id;
|
$arrayselected[] = $cat->id;
|
||||||
}
|
}
|
||||||
print $form->multiselectarray('suppcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
|
print $form->multiselectarray('suppcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Multicurrency
|
// Multicurrency
|
||||||
if (!empty($conf->multicurrency->enabled))
|
if (!empty($conf->multicurrency->enabled))
|
||||||
@ -2560,7 +2562,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Supplier
|
// Supplier
|
||||||
if ($object->fournisseur) {
|
if (!empty($conf->fournisseur->enabled) && $object->fournisseur) {
|
||||||
print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>';
|
print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1);
|
print $form->showCategories($object->id, Categorie::TYPE_SUPPLIER, 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user