Sorry for the late reply.
Try:
SELECT
T0.DocDate AS 'Document Date'
, T3.ReconDate
, T0.DocEntry AS 'Document Entry'
, T0.DocDate As 'Document Status'
, T0.DocNum AS 'Document No.'
, T0.CardName AS 'Customer Name'
, T1.ItemCode AS 'Part No.'
, T1.Quantity AS 'Quantity'
, T1.LineTotal AS 'Total in LC'
, T1.TotalFrgn AS 'Total in FC'
, T2.ReconNum AS 'Recon. No.'
, T3.ReconDate AS 'Recon. Date'
, 'Status'=CASE
WHEN (T0.DocDate < T3.ReconDate) OR T3.ReconDate is not NULL THEN 'O'
ELSE
'C'
END
FROM OINV T0 WITH (NOLOCK)
LEFT JOIN INV1 T1 WITH (NOLOCK) ON T1.DocEntry = T0.DocEntry
LEFT JOIN ITR1 T2 WITH (NOLOCK) ON T2.SrcObjAbs = T0.DocEntry AND T2.SrcObjTyp = T0.ObjType
LEFT JOIN OITR T3 WITH (NOLOCK) ON T3.ReconNum = T2.ReconNum
WHERE T0.DocNum = [%0] and T0.DocDate =[%1] and T3.ReconDate <=[%2]