警告:检验单-来料检验OK的提醒
小于 1 分钟
- 示例代码
SELECT T0.[U_DocNum] AS '采购订单号', T0.[U_BaseEntry], T0.[DocEntry] AS '检验单号', T0.[U_CardCode], T0.[U_CardName]
, T0.[U_ItemCode], T0.[U_ItemName], T0.[U_Spec], T0.[U_BatchNum], T0.[U_Qty]
, T0.[U_Qty1], T1.[U_Qty], T1.[U_Qty1], T1.[U_Status]
FROM [dbo].[@OQAD] T0
INNER JOIN [dbo].[@QAD1] T1 ON T1.docentry = t0.docentry
INNER JOIN OPOR T2 ON T2.docentry = T0.[U_DocNum]
WHERE T1.[U_Status] = 'OK'
AND T0.[U_DocType] = 'A'
AND T2.[DocStatus] = 'o'
AND T2.[CANCELED] = 'N'
ORDER BY T2.docentry