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

Re: I need query reports

$
0
0

Naga sir,

 

Not  this query.. i have query based on po to grn but i need include a/p and outgoing ..

can forward this query.. please make me clear sir,

 

SELECT T0.[CardCode] as [BP Code], T0.[CardName] as [BP Name],

T0.[DocNum] as [PO Number], T1.[ItemCode] as [Stock Item],

T1.[Quantity], T1.[OpenQty],

SUM(isnull(T3.[Quantity],0)) as 'Received Qty',

T1.[Quantity]-SUM(isnull(T3.[Quantity],0)) as [Left to Deliver]

FROM dbo.OPOR T0 

INNER JOIN dbo.POR1 T1 ON T0.DocEntry = T1.DocEntry

LEFT JOIN dbo.PDN1 T3 ON T3.BaseEntry = T0.DocEntry AND T3.BaseLine = T1.Linenum

LEFT JOIN dbo.OPDN T2 ON T2.DocEntry = T3.DocEntry

WHERE T0.[DocDate]  >=[%0] AND T0.[DocDate] <=[%1] AND T0.[CardName] =[%2]

GROUP BY T0.[CardCode], T0.[CardName], T0.[DocNum], T1.[ItemCode],

T1.[Quantity], T1.[OpenQty]

 

 

this query i want to include in a/p invoce and outgoing payment ( table)

 

thanks

dineshkumar kannan


Viewing all articles
Browse latest Browse all 8368

Trending Articles



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