跳至主要內容

警告:检验单-成品检验OK的提醒

五六零网校小于 1 分钟

  • 示例代码
SELECT T0.[U_DocNum], T0.[U_Qty], T0.[DocEntry] AS 检验单号, T0.[U_DocType]
	, CASE 
		WHEN T0.[U_DocType] = 'B' THEN N'出货'
		WHEN T0.[U_DocType] = 'A' THEN N'来料'
		WHEN T0.[U_DocType] = 'C' THEN N'库存'
	END AS 检验类型, T0.[U_TaxDate], T0.[U_Status1], T0.[U_CardName], T0.[U_ItemCode]
	, T0.[U_ItemName], T0.[U_Qty], T0.[U_UserName1], T0.[U_Status]
FROM [dbo].[@OQAD] T0
	LEFT JOIN IGN1 T2
	ON T0.[U_DocNum] = T2.[BaseRef]
		AND T0.[U_ItemCode] = T2.[ItemCode]
WHERE T0.[U_DocType] = 'B'
	AND T0.[U_Status] = 'OK'
	AND T0.[U_TaxDate] = CONVERT(nvarchar(12), GETDATE(), 112)