Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
01c140ec
Commit
01c140ec
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
FIX External user must not be able to edit its discounts
parent
4382724b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/comm/remx.php
+38
-28
38 additions, 28 deletions
htdocs/comm/remx.php
with
38 additions
and
28 deletions
htdocs/comm/remx.php
+
38
−
28
View file @
01c140ec
...
@@ -130,7 +130,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
...
@@ -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->societe->creer)
//if ($user->rights->facture->creer)
//if ($user->rights->facture->creer)
...
@@ -257,38 +257,48 @@ if ($socid > 0)
...
@@ -257,38 +257,48 @@ if ($socid > 0)
print
'<tr><td class="titlefield">'
.
$langs
->
trans
(
"CustomerAbsoluteDiscountAllUsers"
)
.
'</td>'
;
print
'<tr><td class="titlefield">'
.
$langs
->
trans
(
"CustomerAbsoluteDiscountAllUsers"
)
.
'</td>'
;
print
'<td>'
.
$remise_all
.
' '
.
$langs
->
trans
(
"Currency"
.
$conf
->
currency
)
.
' '
.
$langs
->
trans
(
"HT"
)
.
'</td></tr>'
;
print
'<td>'
.
$remise_all
.
' '
.
$langs
->
trans
(
"Currency"
.
$conf
->
currency
)
.
' '
.
$langs
->
trans
(
"HT"
)
.
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"CustomerAbsoluteDiscountMy"
)
.
'</td>'
;
if
(
!
empty
(
$user
->
fk_soc
))
// No need to show this for external users
print
'<td>'
.
$remise_user
.
' '
.
$langs
->
trans
(
"Currency"
.
$conf
->
currency
)
.
' '
.
$langs
->
trans
(
"HT"
)
.
'</td></tr>'
;
{
print
'<tr><td>'
.
$langs
->
trans
(
"CustomerAbsoluteDiscountMy"
)
.
'</td>'
;
print
'<td>'
.
$remise_user
.
' '
.
$langs
->
trans
(
"Currency"
.
$conf
->
currency
)
.
' '
.
$langs
->
trans
(
"HT"
)
.
'</td></tr>'
;
}
print
'</table>'
;
print
'</table>'
;
print
'<br>'
;
print
load_fiche_titre
(
$langs
->
trans
(
"NewGlobalDiscount"
),
''
,
''
);
print
'<table class="border" width="100%">'
;
print
'<tr><td width="38%">'
.
$langs
->
trans
(
"AmountHT"
)
.
'</td>'
;
print
'<td><input type="text" size="5" name="amount_ht" value="'
.
$_POST
[
"amount_ht"
]
.
'">'
;
print
'<span class="hideonsmartphone"> '
.
$langs
->
trans
(
"Currency"
.
$conf
->
currency
)
.
'</span></td></tr>'
;
print
'<tr><td width="38%">'
.
$langs
->
trans
(
"VAT"
)
.
'</td>'
;
print
'<td>'
;
print
$form
->
load_tva
(
'tva_tx'
,
GETPOST
(
'tva_tx'
),
$mysoc
,
$object
);
print
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"NoteReason"
)
.
'</td>'
;
print
'<td><input type="text" size="60" name="desc" value="'
.
$_POST
[
"desc"
]
.
'"></td></tr>'
;
print
"</table>"
;
if
(
$user
->
rights
->
societe
->
creer
)
{
print
'<br>'
;
print
load_fiche_titre
(
$langs
->
trans
(
"NewGlobalDiscount"
),
''
,
''
);
print
'<table class="border" width="100%">'
;
print
'<tr><td width="38%">'
.
$langs
->
trans
(
"AmountHT"
)
.
'</td>'
;
print
'<td><input type="text" size="5" name="amount_ht" value="'
.
$_POST
[
"amount_ht"
]
.
'">'
;
print
'<span class="hideonsmartphone"> '
.
$langs
->
trans
(
"Currency"
.
$conf
->
currency
)
.
'</span></td></tr>'
;
print
'<tr><td width="38%">'
.
$langs
->
trans
(
"VAT"
)
.
'</td>'
;
print
'<td>'
;
print
$form
->
load_tva
(
'tva_tx'
,
GETPOST
(
'tva_tx'
),
$mysoc
,
$object
);
print
'</td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"NoteReason"
)
.
'</td>'
;
print
'<td><input type="text" size="60" name="desc" value="'
.
$_POST
[
"desc"
]
.
'"></td></tr>'
;
print
"</table>"
;
}
print
'</div>'
;
print
'</div>'
;
dol_fiche_end
();
dol_fiche_end
();
print
'<div class="center">'
;
if
(
$user
->
rights
->
societe
->
creer
)
print
'<input type="submit" class="button" name="submit" value="'
.
$langs
->
trans
(
"AddGlobalDiscount"
)
.
'">'
;
{
if
(
!
empty
(
$backtopage
))
print
'<div class="center">'
;
{
print
'<input type="submit" class="button" name="submit" value="'
.
$langs
->
trans
(
"AddGlobalDiscount"
)
.
'">'
;
print
' '
;
if
(
!
empty
(
$backtopage
))
print
'<input type="submit" class="button" name="cancel" value="'
.
$langs
->
trans
(
"Cancel"
)
.
'">'
;
{
}
print
' '
;
print
'</div>'
;
print
'<input type="submit" class="button" name="cancel" value="'
.
$langs
->
trans
(
"Cancel"
)
.
'">'
;
}
print
'</div>'
;
}
print
'</form>'
;
print
'</form>'
;
...
@@ -414,7 +424,7 @@ if ($socid > 0)
...
@@ -414,7 +424,7 @@ if ($socid > 0)
print
'<br>'
;
print
'<br>'
;
/*
/*
* List
e r
is
t
ou
rnes appliquees
(=liees a une ligne de facture ou facture)
* List
d
is
c
ou
nt consumed
(=liees a une ligne de facture ou facture)
*/
*/
// Remises liees a lignes de factures
// Remises liees a lignes de factures
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment