采购申请单执行进度表
小于 1 分钟
代码示例
SELECT T0.[DocNum] AS '采购申请', T0.[DocDate] AS '申请日期', T0.[DocDueDate] AS '申请到期日', T1.[ItemCode], T1.[Dscription]
, T1.[Quantity] AS '申请数量', T1.[OpenQty] AS '申请剩余数量', T2.[DocEntry] AS '采购订单', T2.[Quantity] AS '采购数量', T3.[DocEntry] AS '采购收货'
, T3.[Quantity] AS '收货数量'
FROM OPRQ T0
INNER JOIN PRQ1 T1 ON T0.[DocEntry] = T1.[DocEntry]
LEFT JOIN POR1 T2
ON T2.[BaseEntry] = t1.docentry
AND T2.[BaseLine] = T1.[LineNum]
LEFT JOIN PDN1 T3
ON T3.[BaseEntry] = t2.docentry
AND T3.[BaseLine] = T2.[LineNum]
WHERE T0.[DocDate] >= [%0]
AND T0.[DocDate] <= [%1]