cancel
Showing results for 
Search instead for 
Did you mean: 

Validate price in sales order

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (0)