Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8627

Re: alerts for SO and ARDP

$
0
0

Hi,

 

I already created a query for my alert, hope it can help you out.

 

Select D.DOCNUM AS 'SO NUMBER',D.DocTotal AS 'TOTAL',sum(D.PaidToDate) AS 'DOWN PAYMENT AMOUNT'

FROM (select  c.Doctotal,A.PaidToDate,C.DocNum

from ODPI a

left join DPI1 b on a.DocEntry=b.docentry

left join ORDR c on b.BaseEntry=c.DocEntry

left join RDR1 d on c.DocEntry=d.DocEntry

where

b.BaseType='17' and

c.CANCELED<>'Y' and

a.canceled<>'Y' AND

C.DocStatus<>'C' and

d.TargetType='-1'

group by C.DocNum,C.DocTotal,a.PaidToDate) D

group by d.DocTotal,d.DOCNUM

having (SUM(d.PaidToDate)/D.DocTotal)>='0.25'

 

Regards,

Lean


Viewing all articles
Browse latest Browse all 8627

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>