Dear Experts,
I want to display PO Against GRPO. I am little bit confused about above query output.
For Example : i have an total 10 Items in PO but in GRPO only 6 Items will be there but with using above query i only find matching items records.
I want all item detail in Purchase order.
SELECT DISTINCT T0.[DocNum] as 'PO No', T0.CardName as 'PO CardName', T1.ItemCode as 'PO ItemCode', T1.Dscription as 'PO Item Desc', T1.Quantity as 'PO Item Qty', T1.PriceBefDi as 'PO Item Unit Price' ,((T1.PriceBefDi-(T1.PriceBefDi*T1.DiscPrcnt/100))*T1.Quantity) as 'PO Price Aftr Disc', T3.[DocNum] as 'GRN No', T3.CardName as 'GRN CardName', T2.ItemCode as 'GRN ItemCode', T2.Dscription as 'GRN Item Desc', T2.Quantity as 'GRN Item Qty', T2.PriceBefDi as 'GRN Item Unit Price', ((T2.PriceBefDi-(T2.PriceBefDi*T2.DiscPrcnt/100))*T2.Quantity) as 'GRN Price Aftr Disc'
FROM OPOR T0
INNER JOIN POR1 T1 ON
T0.DocEntry = T1.DocEntry
INNER JOIN PDN1 T2 ON
T1.DocEntry= T2.BaseEntry AND
T1.LineNum=T2.BaseLine
INNER JOIN OPDN T3 ON
T2.DocEntry = T3.DocEntry
where T0.DocNum = ' '
Thanks & Regards,
Nishit Makadia