Merge pull request #956 from cbattarel/3.3
fix bug : external users should not see costprice and margin infos
This commit is contained in:
commit
416cdd2f9c
@ -32,7 +32,7 @@ English Dolibarr ChangeLog
|
|||||||
- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work
|
- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work
|
||||||
- Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay
|
- Fix: [ bug #866 ] Standing order from an invoice suggests invoice total amount instead of remaining to pay
|
||||||
- Fix: [ bug #788 ] Date of linked interventions are not shown
|
- Fix: [ bug #788 ] Date of linked interventions are not shown
|
||||||
|
- Fix: external users should not see costprice and margin infos
|
||||||
|
|
||||||
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
||||||
|
|
||||||
|
|||||||
@ -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">';
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class modMargin extends DolibarrModules
|
|||||||
// New pages on tabs
|
// New pages on tabs
|
||||||
$this->tabs = array(
|
$this->tabs = array(
|
||||||
'product:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/productMargins.php?id=__ID__',
|
'product:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/productMargins.php?id=__ID__',
|
||||||
'thirdparty:+margin:Margins:margins:$conf->margin->enabled:/margin/tabs/thirdpartyMargins.php?socid=__ID__'
|
'thirdparty:+margin:Margins:margins:$conf->margin->enabled && empty($user->societe_id):/margin/tabs/thirdpartyMargins.php?socid=__ID__'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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)) {?>
|
||||||
|
|||||||
@ -45,8 +45,8 @@ MargeBrute=Marge brute
|
|||||||
MargeNette=Marge nette
|
MargeNette=Marge nette
|
||||||
MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT<br/>Marge nette : Prix de vente HT - Coût de revient
|
MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT<br/>Marge nette : Prix de vente HT - Coût de revient
|
||||||
|
|
||||||
CostPrice=Prix d'achat
|
BuyingPrice=Prix d'achat
|
||||||
BuyingCost=Coût de revient
|
CostPrice=Prix de revient
|
||||||
UnitCharges=Charge unitaire
|
UnitCharges=Charge unitaire
|
||||||
Charges=Charges
|
Charges=Charges
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user