on 05-05-2016 3:07 AM
Hi
Can you explain little more, the discount always should be 0 or should not edit the value which is copied from the PO.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this
IF @object_type = '20'
AND @transaction_type IN ('A', 'u')
BEGIN
IF EXISTS(
SELECT t1.docentry
FROM opdn t1
INNER JOIN pdn1 t2
ON t1.docentry = t2.docentry
inner join opor c on t2.BaseEntry=c.docentry
WHERE @list_of_cols_val_tab_del = t1.docentry
and T1.DiscSum <> c.DiscSum
)
BEGIN
SET @error = -1
SET @error_message = 'You Cannot change the discount'
END
END
try this
IF @object_type = '20'
AND @transaction_type IN ('A', 'u')
BEGIN
IF EXISTS(
SELECT t1.docentry
FROM opdn t1
INNER JOIN pdn1 t2
ON t1.docentry = t2.docentry
inner join opor c on t2.BaseEntry=c.docentry
WHERE @list_of_cols_val_tab_del = t1.docentry
and T1.DiscPrcnt<> c.DiscPrcnt
)
BEGIN
SET @error = -1
SET @error_message = 'You Cannot change the discount'
END
END
User | Count |
---|---|
91 | |
10 | |
9 | |
5 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.