我需要将用户选择的日期(DocDate)添加到以下查询
SELECT DocNum, CardCode, CardName FROM ORDR WHERE DOCENTRY NOT IN(
select DISTINCT(T0.DOCENTRY)
from ORDR T0 JOIN RDR1 T1 ON T0.DOCENTRY = T1.DOCENTRY
LEFT JOIN OITM T2 ON T1.ITEMCODE = T2.ITEMCODE
LEFT JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
WHERE T3.ItmsGrpNam = 'Carriage Out'
AND T0.DocType = 'I'
)
AND DOCTYPE = 'I'