diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index d84626fe5f6e138c1f19880d0c2da976418305ba..4e1d3be899add89acf90773b06c05d7038c15429 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -81,7 +81,7 @@ if ($_GET["action"] == 'attribute_prefix') $societe->attribute_prefix($db, $_GET["socid"]); } // conditions de r�glement -if ($_POST["action"] == 'setconditions') +if ($_POST["action"] == 'setconditions' && (!$user->societe_id > 0)) { $societe = new Societe($db, $_GET["socid"]); @@ -92,7 +92,7 @@ if ($_POST["action"] == 'setconditions') if (! $result) dolibarr_print_error($result); } // mode de r�glement -if ($_POST["action"] == 'setmode') +if ($_POST["action"] == 'setmode' && (!$user->societe_id > 0)) { $societe = new Societe($db, $_GET["socid"]); $societe->mode_reglement=$_POST['mode_reglement_id']; @@ -102,7 +102,7 @@ if ($_POST["action"] == 'setmode') if (! $result) dolibarr_print_error($result); } // assuj�tissement � la TVA -if ($_POST["action"] == 'setassujtva') +if ($_POST["action"] == 'setassujtva' && (!$user->societe_id > 0)) { $societe = new Societe($db, $_GET["socid"]); $societe->tva_assuj=$_POST['assujtva_value']; diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index caa53f83e1b3b65020d1e9217f1f09c69998cf2f..8396bd37a60d2d199dd19b6748e3aa708ff586e1 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -178,7 +178,10 @@ if ($socid > 0) print '<table width="100%" class="nobordernopadding"><tr><td nowrap>'; print $langs->trans("CustomerRelativeDiscountShort"); print '<td><td align="right">'; - print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$societe->id.'">'.img_edit($langs->trans("Modify")).'</a>'; + if (!$user->societe_id > 0) + { + print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$societe->id.'">'.img_edit($langs->trans("Modify")).'</a>'; + } print '</td></tr></table>'; print '</td><td colspan="3">'.($societe->remise_client?$societe->remise_client.'%':$langs->trans("DiscountNone")).'</td>'; print '</tr>'; @@ -189,7 +192,10 @@ if ($socid > 0) print '<tr><td nowrap>'; print $langs->trans("CustomerAbsoluteDiscountShort"); print '<td><td align="right">'; - print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$societe->id.'">'.img_edit($langs->trans("Modify")).'</a>'; + if (!$user->societe_id > 0) + { + print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$societe->id.'">'.img_edit($langs->trans("Modify")).'</a>'; + } print '</td></tr></table>'; print '</td>'; print '<td colspan="3">'; diff --git a/htdocs/lib/company.lib.php b/htdocs/lib/company.lib.php index ff9e4bade095ca33f55a5b8227b12c14683cbaff..d340a00b33fc6165ce067cc982abd1e10e2fb409 100644 --- a/htdocs/lib/company.lib.php +++ b/htdocs/lib/company.lib.php @@ -71,10 +71,13 @@ function societe_prepare_head($objsoc) $h++; } - $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$objsoc->id; - $head[$h][1] = $langs->trans("Note"); - $head[$h][2] = 'note'; - $h++; + if ($user->societe_id == 0) + { + $head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$objsoc->id; + $head[$h][1] = $langs->trans("Note"); + $head[$h][2] = 'note'; + $h++; + } if ($user->societe_id == 0) { @@ -84,18 +87,21 @@ function societe_prepare_head($objsoc) $h++; } - if (! $conf->global->SOCIETE_DISABLE_NOTIFICATIONS) + if (! $conf->global->SOCIETE_DISABLE_NOTIFICATIONS && $user->societe_id == 0) { $head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$objsoc->id; $head[$h][1] = $langs->trans("Notifications"); $head[$h][2] = 'notify'; $h++; - } - + } + + if ($user->societe_id == 0) + { $head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$objsoc->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; + } if ($conf->bookmark->enabled && $user->rights->bookmark->creer) {