Quantcast
Viewing all articles
Browse latest Browse all 9760

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

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 9760

Trending Articles