diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 66b5f68564e..512c66f9ddd 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -1459,15 +1459,22 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
}
// Type - Workforce/Staff
- print '
'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).' browser->layout == 'phone' ? ' colspan="3"' : '').'>'."\n";
+ print ' '.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).' browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>'."\n";
$sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
- print ' ';
- if ($conf->browser->layout == 'phone') print '';
- print ''.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).' browser->layout == 'phone' ? ' colspan="3"' : '').'>';
- print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
- if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+ if (empty($conf->global->SOCIETE_DISABLE_WORKFORCE))
+ {
+ print ' ';
+ if ($conf->browser->layout == 'phone') print ' ';
+ print ''.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).' browser->layout == 'phone' ? ' colspan="3"' : '').'>';
+ print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
+ if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+ }
+ else
+ {
+ print ' ';
+ }
print ' ';
// Legal Form
@@ -2081,14 +2088,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
print '';
// Type - Workforce/Staff
- print ''.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).' ';
+ print ' '.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).' browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>';
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
- print ' ';
- if ($conf->browser->layout == 'phone') print '';
- print ''.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).' ';
- print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
- if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+ if (empty($conf->global->SOCIETE_DISABLE_WORKFORCE))
+ {
+ print ' ';
+ if ($conf->browser->layout == 'phone') print ' ';
+ print ''.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).' ';
+ print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id, 0, 0, 0, '', 0, 0, 0, '', '', 1);
+ if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+ }
+ else
+ {
+ print ' ';
+ }
print ' ';
// Juridical type
@@ -2494,7 +2508,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
print '';
// Workforce/Staff
- print ''.$langs->trans("Workforce").' '.$object->effectif.' ';
+ if (empty($conf->global->SOCIETE_DISABLE_WORKFORCE))
+ {
+ print ''.$langs->trans("Workforce").' '.$object->effectif.' ';
+ }
print '';
print '';