Dear All
I created one GRN Query report in this I m getting the data but I need If in 1 GRN if Line item is more then one then system should give ap invoice and its amount more then one time but i want only one time customer vendor detail with AR invoice detail against grpo more then one line item
query is
SELECT OPDN.DocNum, PDN1.Dscription, PDN1.Quantity, PDN1.UomCode, PDN1.VatSum, OPDN.CardName, OPCH.DocNum AS [AP Inv Doc No],
OPOR.DocNum AS [PO Doc No], OPOR.DocDate, POR1.Quantity AS [PO Qty], OPCH.DocTotal, PDN1.FreeTxt, PDN1.Text
FROM OPOR INNER JOIN
POR1 ON OPOR.DocEntry = POR1.DocEntry RIGHT OUTER JOIN
OPCH INNER JOIN
PCH1 ON OPCH.DocEntry = PCH1.DocEntry RIGHT OUTER JOIN
OPDN INNER JOIN
PDN1 ON OPDN.DocEntry = PDN1.DocEntry ON PCH1.BaseEntry = PDN1.DocEntry AND PCH1.BaseLine = PDN1.LineNum ON
POR1.LineNum = PDN1.BaseLine AND POR1.DocEntry = PDN1.BaseEntry
Thanks
Ricky