Skip to Content
0
Former Member
Jul 11, 2009 at 07:20 PM

Approval Procedure

14 Views

Hello

I've tried to create an Approval Procedure, to validate when the user changes the price with respect to the price's list. In the Approval Template associate the following query:

DECLARE @SumaFac Numeric(16,2)

SELECT @SumaFac = SUM(T0.Quantity * T4.Price)

FROM RDR1 T0

LEFT JOIN ORDR T1 ON T0.DocEntry = T1.DocEntry

LEFT JOIN OCRD T2 ON T1.CardCode = T2.CardCode

LEFT JOIN OPLN T3 ON T2.ListNum = T3.ListNum

LEFT JOIN ITM1 T4 ON T3.ListNum = T4.PriceList AND T0.ItemCode = T4.ItemCode

WHERE T1.DocNum = $[$4.1.Number]

SELECT 'TRUE' WHERE @SumaFac <> $[$22.85.Number]

but does not send the Approval Procedure.

Thanks in Advance, Oscar