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