Remove useless tab of categories
This commit is contained in:
parent
bbd8a712cf
commit
14b1fb845f
@ -82,7 +82,7 @@ function societe_prepare_head(Societe $object)
|
||||
$h++;
|
||||
}
|
||||
//show categorie tab
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
/*if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$type = Categorie::TYPE_CUSTOMER;
|
||||
@ -91,7 +91,7 @@ function societe_prepare_head(Societe $object)
|
||||
$head[$h][1] = $langs->trans('Categories');
|
||||
$head[$h][2] = 'category';
|
||||
$h++;
|
||||
}
|
||||
}*/
|
||||
|
||||
// Tab to link resources
|
||||
if ($conf->resource->enabled && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES))
|
||||
|
||||
@ -1229,11 +1229,14 @@ else
|
||||
}
|
||||
|
||||
// Categories
|
||||
print '<tr><td valign="top">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST( 'custcats', 'array' ), null, null, null, null, 250);
|
||||
print "</td></tr>";
|
||||
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td class="toptd">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
@ -1736,17 +1739,20 @@ else
|
||||
}
|
||||
|
||||
// Categories
|
||||
print '<tr><td><label for="custcats">' . $langs->trans( "Categories" ) . '</label></td>';
|
||||
print '<td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories( Categorie::TYPE_CUSTOMER, null, null, null, null, 1 );
|
||||
$c = new Categorie( $db );
|
||||
$cats = $c->containing( $object->id, Categorie::TYPE_CUSTOMER );
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
print $form->multiselectarray( 'custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '100%' );
|
||||
print "</td></tr>";
|
||||
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td><label for="custcats">' . $langs->trans("Categories") . '</label></td>';
|
||||
print '<td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories( Categorie::TYPE_CUSTOMER, null, null, null, null, 1);
|
||||
$c = new Categorie( $db );
|
||||
$cats = $c->containing( $object->id, Categorie::TYPE_CUSTOMER );
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
print $form->multiselectarray( 'custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
// Other attributes
|
||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
@ -2174,11 +2180,14 @@ else
|
||||
}
|
||||
|
||||
// Categories
|
||||
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showCategories( $object->id, 'customer', 1 );
|
||||
print "</td></tr>";
|
||||
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showCategories( $object->id, 'customer', 1 );
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user