Some fix for multicompany module

This commit is contained in:
Laurent Destailleur 2015-03-23 02:39:41 +01:00
parent 15ac0894c9
commit f4b1d95b3e
2 changed files with 7 additions and 9 deletions

View File

@ -313,10 +313,8 @@ $dolibarr_main_db_prefix='';
// multicompany_transverse_mode // multicompany_transverse_mode
// Prerequisite: Need external module "multicompany" // Prerequisite: Need external module "multicompany"
// Pyramidal (0): The rights and groups are managed in each entity, // Pyramidal (0): The rights and groups are managed in each entity. Each user belongs to the entity he was created into.
// users belong to the entity for their rights. // Transversal (1): The user is managed only into master entity and belongs to all entities or only one dedicated entity.
// Transversal (1): The groups can belong only to the master entity
// and that the user belongs to a particular entity
// Default value: 0 (pyramidal) // Default value: 0 (pyramidal)
// Examples: // Examples:
// $multicompany_transverse_mode='1'; // $multicompany_transverse_mode='1';

View File

@ -984,7 +984,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
print '<input size="8" type="text" name="weeklyhours" value="'.GETPOST('weeklyhours').'">'; print '<input size="8" type="text" name="weeklyhours" value="'.GETPOST('weeklyhours').'">';
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
// Accountancy code // Accountancy code
if ($conf->salaries->enabled) if ($conf->salaries->enabled)
{ {
@ -1337,7 +1337,7 @@ else
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>'; print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="2">'.$object->accountancy_code.'</td>'; print '<td colspan="2">'.$object->accountancy_code.'</td>';
} }
// Color user // Color user
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
{ {
@ -1425,7 +1425,7 @@ else
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
{ {
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">'; print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
if ($object->admin && ! $object->entity) if (empty($object->entity))
{ {
print $langs->trans("AllEntities"); print $langs->trans("AllEntities");
} }
@ -2049,7 +2049,7 @@ else
} }
print '</td>'; print '</td>';
print "</tr>"; print "</tr>";
} }
// User color // User color
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
@ -2119,7 +2119,7 @@ else
if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity) if (empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
{ {
print "<tr>".'<td valign="top">'.$langs->trans("Entity").'</td>'; print "<tr>".'<td valign="top">'.$langs->trans("Entity").'</td>';
print "<td>".$mc->select_entities($object->entity); print "<td>".$mc->select_entities($object->entity, 'entity', '', 0, 1); // last parameter 1 means, show also a choice 0=>'all entities'
print "</td></tr>\n"; print "</td></tr>\n";
} }
else else