Merge pull request #8727 from ATM-Marc/NEW_conf_thirdparty_tag

NEW: hidden conf to assign category to thirparty neither customer nor prospect nor supplier
This commit is contained in:
Laurent Destailleur 2018-05-05 13:16:42 +02:00 committed by GitHub
commit c86ca55176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1399,7 +1399,7 @@ else
$langs->load('categories');
// 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">';
$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,
@ -1976,7 +1976,7 @@ else
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
// 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 '<td colspan="3">';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, null, null, null, 1);
@ -2370,7 +2370,7 @@ else
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
{
// 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 '<td>';
print $form->showCategories($object->id, 'customer', 1);