Skip to content
Snippets Groups Projects
Commit e854700d authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: bug #17236

Modif: on cache les onglets "note", "notifications" et "info" de la fiche société pour
 un utilisateur externe.
parent 1edb516b
Branches
Tags
No related merge requests found
......@@ -81,7 +81,7 @@ if ($_GET["action"] == 'attribute_prefix')
$societe->attribute_prefix($db, $_GET["socid"]);
}
// conditions de rglement
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 rglement
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);
}
// assujtissement 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'];
......
......@@ -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">';
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">';
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">';
......
......@@ -71,10 +71,13 @@ function societe_prepare_head($objsoc)
$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,7 +87,7 @@ 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");
......@@ -92,10 +95,13 @@ function societe_prepare_head($objsoc)
$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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment