SELECT T0.[CardName] as 'Customer Name', (T2.SeqName)+'-'+CONVERT(NVARCHAR(5),T0.[Serial]) as 'Invoice No.', T0.[DocDate] as 'Invoice Date', T0.[U_LRUPDATEDATE],
T1.[ItemCode] as 'Talbros Part #', T1.[SubCatNum] as 'Customer Part #', T1.[Quantity] as 'Quantity',
T0.[U_Transporter] as 'Transporter', T0.[U_GRLRNO] as 'GR / LR #'
FROM OINV T0
INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN NFN1 T2 ON T0.SeqCode=T2.SeqCode
WHERE T0.[CardCode] IN ('16M096')
and
T0.[U_LRUpdateDate] between DATEADD(month, DATEDIFF(month, 0, getdate()), 0) and getdate() and
T0.[U_GRLRNO] IS NOT NULL
ORDER BY T1.[ItemCode] ,T0.DocDate
No comments :
Post a Comment