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