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

Re: need query linking A/P Invoice also need A/P credit memo in the same report against which document is it done

$
0
0

Hi Shahan

 

 

Try the below query

 

SELECT 'Invoice' 'Type',T0.[DocNum],T0.DocStatus, T0.[DocDate], T0.[CardCode], T0.[CardName],t1.Dscription, T1.Price,T1.AcctCode,T1.Project,

T0.[DocCur], T0.[DocTotal], T0.[Comments]

FROM OPCH T0 INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.DocType = 'I' AND T0.[CANCELED] = 'N'

UNION ALL

SELECT 'Credit Memo',T0.[DocNum],T0.DocStatus, T0.[DocDate], T0.[CardCode], T0.[CardName],t1.Dscription,T1.Price,T1.AcctCode,T1.Project,

T0.[DocCur], T0.[DocTotal], T0.[Comments]

FROM ORPC T0  INNER JOIN RPC1 T1 ON T0.DocEntry = T1.DocEntry

 

 

With Regards

 

Balaji Sampath


Viewing all articles
Browse latest Browse all 8944

Trending Articles



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