cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction Notification

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member218051
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Carin,

Post something you have done already so that we can start from there.

Thanks,

Gordon

Former Member
0 Kudos

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

former_member217514
Active Contributor
0 Kudos

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