on 02-09-2012 6:51 AM
Dear all,
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>
Hi,
Try:
SELECT distinct 'TRUE'
FROM OINV T0
inner join RIN1 T2 on t2.BaseEntry=T0.DocEntry AND T2.BaseType = 13
inner join ORIN T3 on T2.DocEntry = T3.DocEntry
where DATEDIFF(day,T0.DocDate,T3.DocDate) > 180 AND T3.DocEntry=$[ORIN.DocEntry.number\]
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.