I am looking for a query on how to show the items serial number for each of the items in the AR Invoice. If there are multiple quantities we would need to show each result as a separate line. I have tried and have not been successful pulling this information in.
This is the query I would like to add the serial number information to:
SELECT T0.[DocEntry], T0.[TaxDate], T0.[CardName] AS 'BP Name', T5.[GroupName] AS 'BP Group', T7.SlpName AS 'Sales Rep', T2.[validFor] As 'Active', T1.[ItemCode], T3.ItemName, T1.Quantity AS 'Quantity', T4.[ItmsGrpNam] AS 'Item Group', T1.[LineTotal] AS 'Total', T6.Price AS 'RM' FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode INNER JOIN OITM T3 ON T1.ItemCode = T3.ItemCode INNER JOIN OITB T4 ON T3.ItmsGrpCod = T4.ItmsGrpCod INNER JOIN OCRG T5 ON T2.GroupCode = T5.GroupCode INNER JOIN ITM1 T6 ON T3.ItemCode = T6.ItemCode INNER JOIN OSLP T7 ON T2.SlpCode = T7.SlpCode WHERE T0.[TaxDate] >=[%0] and T0.[TaxDate] <=[%1] AND T0.[CANCELED] = 'N' AND T6.Pricelist = '13'
If anyone can give me some guidance I would appreciate the help!