Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8493

Re: due date transection notification

$
0
0

The test that you have to do is with a new production order and not using the old production orders because they may have several duedates.

 

To work always with new and old PO you need this query:

 

IF @OBJECT_TYPE = '202' AND @TRANSACTION_TYPE = 'U'

BEGIN
IF EXISTS(

  SELECT top 1 'True' from
OWOR T0
  WHERE T0.DueDate <> (select top 1 T1.Duedate from Awor T1 where T0.DocEntry = T1.DocEntry order by T1.LogInstanc desc) AND  (T0.docentry = @list_of_cols_val_tab_del))

BEGIN

SELECT @ERROR = 1, @ERROR_MESSAGE = 'you are not allowed to change due date.'

END

END

 






Viewing all articles
Browse latest Browse all 8493

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>