forked from Wavyzz/dolibarr
ADD company option for disable Workforce
This commit is contained in:
@@ -1459,15 +1459,22 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
}
|
||||
|
||||
// Type - Workforce/Staff
|
||||
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'."\n";
|
||||
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.( ($conf->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 '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->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 '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->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 '<input type="hidden" name="effectif_id" id="effectif_id" value="'.$object->effectif_id.'">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Legal Form
|
||||
@@ -2081,14 +2088,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '</tr>';
|
||||
|
||||
// Type - Workforce/Staff
|
||||
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
||||
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.( ($conf->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 '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
||||
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 '</td>';
|
||||
if ($conf->browser->layout == 'phone') print '</tr><tr>';
|
||||
print '<td>'.$form->editfieldkey('Workforce', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
|
||||
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 '<input type="hidden" name="effectif_id" id="effectif_id" value="'.$object->effectif_id.'">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Juridical type
|
||||
@@ -2494,7 +2508,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
print '</td></tr>';
|
||||
|
||||
// Workforce/Staff
|
||||
print '<tr><td>'.$langs->trans("Workforce").'</td><td>'.$object->effectif.'</td></tr>';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_WORKFORCE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Workforce").'</td><td>'.$object->effectif.'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
Reference in New Issue
Block a user