跳至主要內容

采购收货对账报表

五六零网校小于 1 分钟

示例代码

SELECT CASE 
		WHEN T0.[DocStatus] = 'O' THEN '未清'
		WHEN T0.[DocStatus] = 'C' THEN '已结算'
	END AS '单据状态', T2.[SlpName], T0.[Docentry] AS '单据编号', T0.[CardCode], T0.[CardName]
	, T0.[TaxDate], T0.[DocDueDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity]
	, T1.[PriceAfVAT] AS '含税单价', T1.[LineTotal] AS '行总计', T0.[DocTotal]
FROM OPDN T0
	INNER JOIN PDN1 T1 ON T0.[DocEntry] = T1.[DocEntry]
	INNER JOIN OSLP T2 ON T0.[SlpCode] = T2.[SlpCode]
WHERE T0.[CANCELED] = 'N'
ORDER BY T0.[DocNum]