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

incoming payment and credit memos for a BP

$
0
0

Hi,

I am trying to find credit memos and incoming payments fore BP which are open. I have come up with the following query. could someone verify if I am covering everything and what does T0.intrnmatch = '0' really means in the query below. Thanks!

 

select case t0.TransType when 14 then 'AR CN' when 24 then 'Incoming' end 'TransType',

t0.DueDate,case transtype when 14 then t1.comments when 24 then t2.comments end 'Comments',

t0.ref1'Docnum',(T0.BALDUEDEB - T0.BALDUECRED) as 'Balance Due'

from JDT1 t0

left join ORIN t1 on t1.DocNum=t0.Ref1 and t0.TransType=14

left join ORCT t2 on t2.DocNum=t0.Ref1 and t0.TransType=24

where ShortName='Uw1234'

and TransType in ('14','24') and

T0.BALDUEDEB != T0.BALDUECRED  and T0.intrnmatch = '0'

 

order by t0.TransType


Viewing all articles
Browse latest Browse all 9269

Trending Articles