diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php
index a4aff6d71c1..e358b842d2d 100644
--- a/htdocs/comm/remx.php
+++ b/htdocs/comm/remx.php
@@ -130,7 +130,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
}
}
-if ($action == 'setremise')
+if ($action == 'setremise' && $user->rights->societe->creer)
{
//if ($user->rights->societe->creer)
//if ($user->rights->facture->creer)
@@ -257,38 +257,48 @@ if ($socid > 0)
print '
'.$langs->trans("CustomerAbsoluteDiscountAllUsers").' ';
print ''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").' ';
- print ''.$langs->trans("CustomerAbsoluteDiscountMy").' ';
- print ''.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").' ';
+ if (! empty($user->fk_soc)) // No need to show this for external users
+ {
+ print ''.$langs->trans("CustomerAbsoluteDiscountMy").' ';
+ print ''.$remise_user.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").' ';
+ }
print '';
- print ' ';
-
- print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
- print '";
+ if ($user->rights->societe->creer)
+ {
+ print ' ';
+
+ print load_fiche_titre($langs->trans("NewGlobalDiscount"),'','');
+ print '";
+ }
+
print '';
dol_fiche_end();
- print '';
- print ' ';
- if (! empty($backtopage))
- {
- print ' ';
- print ' ';
- }
- print '
';
-
+ if ($user->rights->societe->creer)
+ {
+ print '';
+ print ' ';
+ if (! empty($backtopage))
+ {
+ print ' ';
+ print ' ';
+ }
+ print '
';
+ }
+
print '';
@@ -414,7 +424,7 @@ if ($socid > 0)
print ' ';
/*
- * Liste ristournes appliquees (=liees a une ligne de facture ou facture)
+ * List discount consumed (=liees a une ligne de facture ou facture)
*/
// Remises liees a lignes de factures