on 10-09-2017 7:03 AM
Hi, i need to validate price in sales order with price list and special prices
this is my code:
IF @object_type = '17' and @transaction_type IN ('A','U') BEGIN Set @DocEntry = @list_of_cols_val_tab_del IF (SELECT COUNT(ItemCode) FROM RDR1 WHERE RDR1.DocEntry=@DocEntry AND left(ItemCode,3) LIKE 'KIT') = 0 BEGIN IF EXISTS (SELECT T1.[ItemCode] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry=T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN OPLN T3 ON T3.ListNum = T2.ListNum INNER JOIN ITM1 T4 ON T4.ItemCode = T1.ItemCode WHERE T0.docentry = @DocEntry AND (T1.[price] <> T4.Price) and T2.ListNum = t4.PriceList BEGIN SET @error = 1 SET @error_message = 'EXISTE DIFERENCIA DE PRECIO EN LOS ARTICULOS Y LA LP' END END END
Only validate the price list but in some cases, some items have special prices and don´t work
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.