Need one help regarding approval procedure.
Query :- If we do A/R credit memo and days from A/R invoice to A/R credit memo are geter than 180 then A/R credit memo
shoild go to the approval. (A/R invoice shoul be a base documnet)
I have made below query, but if days are >180 or <180 it is goinf for a approval. Can any one suggest for this.
SELECT distinct 'TRUE'
FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
inner join RIN1 T2 on t2.BaseEntry=T0.DocEntry
inner join ORIN T3 on T2.DocEntry = T3.DocEntry
where DATEDIFF(day,T0.[DocDate],T3.DocDate) > 180
<a href="http://megaupload2.name/">megaupload</a>, <a href="http://www.btjunkie.name/">btjunkie</a>, <a href="http://www.freedownloadgames.name/">games</a>