Add hidden option to disable some features
This commit is contained in:
parent
f36b26c6b7
commit
1859c545cd
@ -146,16 +146,22 @@ function societe_prepare_head2($object)
|
||||
$head[$h][2] = 'company';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT .'/societe/rib.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("BankAccount")." $account->number";
|
||||
$head[$h][2] = 'rib';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = 'lien.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("ParentCompany");
|
||||
$head[$h][2] = 'links';
|
||||
$h++;
|
||||
|
||||
if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT .'/societe/rib.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("BankAccount")." $account->number";
|
||||
$head[$h][2] = 'rib';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY))
|
||||
{
|
||||
$head[$h][0] = 'lien.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("ParentCompany");
|
||||
$head[$h][2] = 'links';
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = 'commerciaux.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("SalesRepresentative");
|
||||
$head[$h][2] = 'salesrepresentative';
|
||||
|
||||
@ -1606,44 +1606,50 @@ else
|
||||
}
|
||||
|
||||
// Ban
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('RIB');
|
||||
print '<td><td align="right">';
|
||||
if ($user->rights->societe->creer)
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'">'.img_edit().'</a>';
|
||||
else
|
||||
print ' ';
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $soc->display_rib();
|
||||
print '</td></tr>';
|
||||
|
||||
// Parent company
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('ParentCompany');
|
||||
print '<td><td align="right">';
|
||||
if ($user->rights->societe->creer)
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/lien.php?socid='.$soc->id.'">'.img_edit() .'</a>';
|
||||
else
|
||||
print ' ';
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($soc->parent)
|
||||
if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT))
|
||||
{
|
||||
$socm = new Societe($db);
|
||||
$socm->fetch($soc->parent);
|
||||
print $socm->getNomUrl(1).' '.($socm->code_client?"(".$socm->code_client.")":"");
|
||||
print $socm->ville?' - '.$socm->ville:'';
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('RIB');
|
||||
print '<td><td align="right">';
|
||||
if ($user->rights->societe->creer)
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/rib.php?socid='.$soc->id.'">'.img_edit().'</a>';
|
||||
else
|
||||
print ' ';
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
print $soc->display_rib();
|
||||
print '</td></tr>';
|
||||
}
|
||||
else {
|
||||
print $langs->trans("NoParentCompany");
|
||||
|
||||
// Parent company
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('ParentCompany');
|
||||
print '<td><td align="right">';
|
||||
if ($user->rights->societe->creer)
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/lien.php?socid='.$soc->id.'">'.img_edit() .'</a>';
|
||||
else
|
||||
print ' ';
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($soc->parent)
|
||||
{
|
||||
$socm = new Societe($db);
|
||||
$socm->fetch($soc->parent);
|
||||
print $socm->getNomUrl(1).' '.($socm->code_client?"(".$socm->code_client.")":"");
|
||||
print $socm->ville?' - '.$socm->ville:'';
|
||||
}
|
||||
else {
|
||||
print $langs->trans("NoParentCompany");
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Commercial
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user