diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php
index 1d100982b05..31b9e35edb3 100644
--- a/htdocs/lib/company.lib.php
+++ b/htdocs/lib/company.lib.php
@@ -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';
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 971dd9ecefe..7e20ec6531d 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -1606,44 +1606,50 @@ else
}
// Ban
- print '
';
- print '| ';
- print $langs->trans('RIB');
- print ' | | ';
- if ($user->rights->societe->creer)
- print ''.img_edit().'';
- else
- print ' ';
- print ' | ';
- print ' | ';
- print '';
- print $soc->display_rib();
- print ' |
';
-
- // Parent company
- print '';
- print '| ';
- print $langs->trans('ParentCompany');
- print ' | | ';
- if ($user->rights->societe->creer)
- print ''.img_edit() .'';
- else
- print ' ';
- print ' | ';
- print ' | ';
- print '';
- 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 ' |
';
+ print '| ';
+ print $langs->trans('RIB');
+ print ' | | ';
+ if ($user->rights->societe->creer)
+ print ''.img_edit().'';
+ else
+ print ' ';
+ print ' | ';
+ print ' | ';
+ print '';
+ print $soc->display_rib();
+ print ' |
';
}
- else {
- print $langs->trans("NoParentCompany");
+
+ // Parent company
+ if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY))
+ {
+ print '';
+ print '| ';
+ print $langs->trans('ParentCompany');
+ print ' | | ';
+ if ($user->rights->societe->creer)
+ print ''.img_edit() .'';
+ else
+ print ' ';
+ print ' | ';
+ print ' | ';
+ print '';
+ 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 ' |
';
}
- print '';
-
+
// Commercial
print '| ';
print ' |