NEW: hidden conf to assign category to thirparty neither customer nor prospect nor supplier
This commit is contained in:
parent
f3003fa542
commit
bc7b05537f
@ -1321,7 +1321,7 @@ else
|
|||||||
$langs->load('categories');
|
$langs->load('categories');
|
||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
if ($object->prospect || $object->client) {
|
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||||
print '<tr><td class="toptd">' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td><td colspan="3">';
|
print '<tr><td class="toptd">' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td><td colspan="3">';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
$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,
|
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null,
|
||||||
@ -1879,7 +1879,7 @@ else
|
|||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
{
|
{
|
||||||
// Customer
|
// Customer
|
||||||
if ($object->prospect || $object->client) {
|
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||||
print '<tr><td>' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td>';
|
print '<tr><td>' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, null, null, null, 1);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, null, null, null, 1);
|
||||||
@ -2269,7 +2269,7 @@ else
|
|||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
{
|
{
|
||||||
// Customer
|
// Customer
|
||||||
if ($object->prospect || $object->client) {
|
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||||
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->showCategories($object->id, 'customer', 1);
|
print $form->showCategories($object->id, 'customer', 1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user