跳至主要內容

查询批次的交易数量

五六零网校小于 1 分钟

查询批次的交易数量

通过此案例可查询交易单据交易的批次数量 T0.[ApplyType] 需要等于基本单据类型

SELECT T0.[ApplyEntry],T0.[CardName], T0.[DocDate], T0.[ItemCode],T2.[DistNumber]
	, T1.[Quantity],T0.[ApplyType] 
FROM OITL T0
	INNER JOIN ITL1 T1 ON T0.[LogEntry] = T1.[LogEntry]
	INNER JOIN OBTN T2
	ON T2.[SysNumber] = T1.[SysNumber]
		AND T2.[ItemCode] = T1.[ItemCode]
ORDER BY T0.[ApplyEntry] DESC