跳至主要內容

采购订单未清明细

五六零网校小于 1 分钟

代码示例

SELECT T0.[DocNum], T0.[CardName], T2.[SlpName] , T0.[DocDate], T0.[DocDueDate]
	, T1.[ItemCode], T1.[Dscription], T1.[Quantity] AS '订单数量', T1.[OpenQty]
	,T1.[Quantity] - T1.[OpenQty] AS '已收货数量'
FROM OPOR T0
	INNER JOIN POR1 T1 ON T0.[DocEntry] = T1.[DocEntry]
	INNER JOIN OSLP T2 ON T0.[SlpCode] = T2.[SlpCode]
WHERE 
	 T0.[DocDate] >= [%1]
	AND T0.[DocDate] <= [%2]
	AND T0.[CANCELED] = 'N'
	AND T0.[DocStatus] = 'O'