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

Re: Alert when there is Overpayment/Underpayment

$
0
0

You may try:

 

select Distinct T0.CardCode, T0.DocNum, T0.DocTotal

from OINV T0

JOIN RCT2 T1 ON T1.DocEntry=T0.DocEntry AND T1.InvType='13'

JOIN ORCT T2 ON T2.DocNum=T1.DocNum

WHERE DateDiff(dd,T2.DocDate,GetDate()) <=30 AND T0.DocTotal != t1.SumApplied

 

Once you can get any results, change <=30 to =0


Viewing all articles
Browse latest Browse all 9190

Trending Articles



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