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++;
|
$h++;
|
||||||
}
|
}
|
||||||
//show categorie tab
|
//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';
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$type = Categorie::TYPE_CUSTOMER;
|
$type = Categorie::TYPE_CUSTOMER;
|
||||||
@ -91,7 +91,7 @@ function societe_prepare_head(Societe $object)
|
|||||||
$head[$h][1] = $langs->trans('Categories');
|
$head[$h][1] = $langs->trans('Categories');
|
||||||
$head[$h][2] = 'category';
|
$head[$h][2] = 'category';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// Tab to link resources
|
// Tab to link resources
|
||||||
if ($conf->resource->enabled && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES))
|
if ($conf->resource->enabled && ! empty($conf->global->RESOURCE_ON_THIRDPARTIES))
|
||||||
|
|||||||
@ -1229,10 +1229,13 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
print '<tr><td valign="top">'.$langs->trans("Categories").'</td><td colspan="3">';
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
$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 '<tr><td class="toptd">'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||||
print "</td></tr>";
|
$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
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||||
@ -1736,16 +1739,19 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
print '<tr><td><label for="custcats">' . $langs->trans( "Categories" ) . '</label></td>';
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
print '<td colspan="3">';
|
{
|
||||||
$cate_arbo = $form->select_all_categories( Categorie::TYPE_CUSTOMER, null, null, null, null, 1 );
|
print '<tr><td><label for="custcats">' . $langs->trans("Categories") . '</label></td>';
|
||||||
$c = new Categorie( $db );
|
print '<td colspan="3">';
|
||||||
$cats = $c->containing( $object->id, Categorie::TYPE_CUSTOMER );
|
$cate_arbo = $form->select_all_categories( Categorie::TYPE_CUSTOMER, null, null, null, null, 1);
|
||||||
foreach ($cats as $cat) {
|
$c = new Categorie( $db );
|
||||||
$arrayselected[] = $cat->id;
|
$cats = $c->containing( $object->id, Categorie::TYPE_CUSTOMER );
|
||||||
}
|
foreach ($cats as $cat) {
|
||||||
print $form->multiselectarray( 'custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '100%' );
|
$arrayselected[] = $cat->id;
|
||||||
print "</td></tr>";
|
}
|
||||||
|
print $form->multiselectarray( 'custcats', $cate_arbo, $arrayselected, '', 0, '', 0, '90%');
|
||||||
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
$parameters=array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
|
||||||
@ -2174,10 +2180,13 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
print '<td colspan="3">';
|
{
|
||||||
print $form->showCategories( $object->id, 'customer', 1 );
|
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
|
||||||
print "</td></tr>";
|
print '<td colspan="3">';
|
||||||
|
print $form->showCategories( $object->id, 'customer', 1 );
|
||||||
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
// Incoterms
|
// Incoterms
|
||||||
if (!empty($conf->incoterm->enabled))
|
if (!empty($conf->incoterm->enabled))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user