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

Re: Query for details of Sale order , Invoice and COGS

$
0
0

Hi Anantha,

 

I hope this is what you want.

 

SELECT   distinct     A.CardCode, A.CardName, A.DocNum, A.DocTotal, E.DocDueDate, E.DocTotal AS [Invoice Amount], E.DocDate, H.FCDebit

FROM            JDT1 AS H INNER JOIN

                         OJDT AS G ON H.TransId = G.TransId INNER JOIN

                         ORDR AS A INNER JOIN

                         RDR1 AS B ON A.DocEntry = B.DocEntry INNER JOIN

                         DLN1 AS D INNER JOIN

                         ODLN AS C ON D.DocEntry = C.DocEntry INNER JOIN

                         INV1 AS F INNER JOIN

                         OINV AS E ON F.DocEntry = E.DocEntry ON D.TrgetEntry = E.DocEntry ON A.DocEntry = D.BaseEntry ON G.TransId = C.TransId

Where H.FCDebit <> 0

 

Regards

Syed Adnan


Viewing all articles
Browse latest Browse all 9159

Trending Articles



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