fix bug : external users should not see costprice and margin infos
This commit is contained in:
parent
047aa8ea29
commit
e3615d43bd
@ -2632,7 +2632,7 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0, $hookmanager=false)
|
function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0, $hookmanager=false)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs,$user;
|
||||||
|
|
||||||
print '<tr class="liste_titre nodrag nodrop">';
|
print '<tr class="liste_titre nodrag nodrop">';
|
||||||
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER))
|
||||||
@ -2646,7 +2646,7 @@ abstract class CommonObject
|
|||||||
print '<td align="right" width="80"> </td>';
|
print '<td align="right" width="80"> </td>';
|
||||||
print '<td align="right" width="50">'.$langs->trans('Qty').'</td>';
|
print '<td align="right" width="50">'.$langs->trans('Qty').'</td>';
|
||||||
print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>';
|
print '<td align="right" width="50">'.$langs->trans('ReductionShort').'</td>';
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
|
||||||
if ($conf->global->MARGIN_TYPE == "1")
|
if ($conf->global->MARGIN_TYPE == "1")
|
||||||
print '<td align="right" width="80">'.$langs->trans('BuyingPrice').'</td>';
|
print '<td align="right" width="80">'.$langs->trans('BuyingPrice').'</td>';
|
||||||
else
|
else
|
||||||
@ -3044,7 +3044,8 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
function displayMarginInfos($force_price=false) {
|
function displayMarginInfos($force_price=false) {
|
||||||
global $langs, $conf;
|
global $langs, $conf,$user;
|
||||||
|
if (! empty($user->societe_id)) return;
|
||||||
$marginInfo = $this->getMarginInfos($force_price);
|
$marginInfo = $this->getMarginInfos($force_price);
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -117,7 +117,7 @@
|
|||||||
<td> </td>
|
<td> </td>
|
||||||
<?php }
|
<?php }
|
||||||
|
|
||||||
if (! empty($conf->margin->enabled)) {
|
if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
|
||||||
?>
|
?>
|
||||||
<td align="right" nowrap="nowrap"><?php echo price($line->pa_ht); ?></td>
|
<td align="right" nowrap="nowrap"><?php echo price($line->pa_ht); ?></td>
|
||||||
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?>
|
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user