on 05-04-2012 2:08 PM
Hi All,
The transaction notification should stop users from changing the Unit Price AFTER the transaction has been added. They should still be able to add or delete rows. My procedure only checks the last row....
Can somebody please help?
Kind regards
Carin
Hi Carin,
If you plan your price lists and their assignment at master level then what you will have to do is to make the unit price column inactive through form settings and no authorization to Document Settings.
This will pull the prices assigned automatically and user will not be able to make the changes.
If at all you need to change the price authorize the user exclusively to do so. We, at our end are doing so and abrupt changes in the price lists have cut down tremendously.
Thanking you
Malhaar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Carin,
Post something you have done already so that we can start from there.
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gordon,
Here is the loop:
WHILE
@COUNT <= @COUNT2
SET @COUNT = @COUNT + 1
--COUNT THE LINES ON THE FORM AND GET THE LINENUM IN #TEMP.
SET @LINENUM = (SELECT LINENUM FROM #TEMP WHERE NUMBER = @COUNT -1)
SET @LINENUM2 = (SELECT LineNum FROM RDR1 WHERE RDR1.DOCENTRY = @list_of_cols_val_tab_del
AND RDR1.LineNum = @LINENUM)
SET @DOCNUM = (SELECT DOCNUM FROM ORDR WHERE ORDR.DOCENTRY = @list_of_cols_val_tab_del)
--USE THE @DOCTOTAL VARIABLES TO GET THE UNIT PRICES THAT IS USED ON THE FORM AND IN #TEMP
SET @DOCTOTAL = (SELECT PRICE FROM #TEMP WHERE LINENUM = @LINENUM2)
SET @DOCTOTAL2 = (SELECT Price FROM RDR1 WHERE RDR1.DOCENTRY = @list_of_cols_val_tab_del
AND RDR1.LineNum = @LINENUM2)
BEGIN
IF @DOCTOTAL2 <> @DOCTOTAL AND @DOCSTATUS = 'O'
AND @USERID NOT IN ('5','13')
BEGIN
SET @error = 5001
SET @error_message = 'Cannot Change Order'--
END
END
IF @transaction_type = 'U' AND @object_type = '17'
BEGIN
if exists (SELECT UserSign FROM ORDR WHERE DocEntry = @list_of_cols_val_tab_del AND UserSign NOT IN ('5', '13'))
begin
IF EXISTS (SELECT T0.DocEntry
FROM RDR1 T0
INNER JOIN ADO1 T1 ON T0.DocEntry = T1.DocEntry AND T0.LineNum = T1.LineNum AND T1.ObjType = 17
WHERE T1.DocEntry = @list_of_cols_val_tab_del AND T1.PriceBefDi <> T0.PriceBefDi )
BEGIN
SELECT @error = 17, @error_message = 'Cannot change order'
END
end
END
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.