生产退料查询
小于 1 分钟
提示
条件:日期范围必选
代码示例
SELECT T0.[DocNum] AS '收货单号', T0.[DocDate], T1.[BaseRef] AS '生产订单号', T1.[ItemCode], T1.[Dscription]
, T1.[Quantity], T1.[WhsCode], T2.[WhsName]
FROM OIGN T0
INNER JOIN IGN1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OWHS T2 ON T1.[WhsCode] = T2.[WhsCode]
WHERE T1.[BaseType] = '202' and T1.[BaseLine] IS NOT NULL
AND T0.[DocDate] >= [%0]
AND T0.[DocDate] <= [%1]
ORDER BY T0.[DocNum] DESC