跳至主要內容

未清销售交货单查询

五六零网校小于 1 分钟

示例代码

SELECT CASE 
		WHEN T0.[DocStatus] = 'O' THEN '未清'
		WHEN T0.[DocStatus] = 'C' THEN '已结算'
	END AS '单据状态', T0.[SupplCode] AS '送货单号', T2.[SlpName], T0.[Docentry] AS '单据编号', T0.[NumAtCard]
	, T0.[CardCode], T0.[CardName], T0.[TaxDate], T1.[SubCatNum], T1.[ItemCode]
	, T1.[Dscription], T1.[Quantity], T1.[PriceBefDi], T1.[PriceAfVAT] AS '含税单价', T0.[DocTotal]
FROM ODLN T0
	INNER JOIN DLN1 T1 ON T0.[DocEntry] = T1.[DocEntry]
	INNER JOIN OSLP T2 ON T0.[SlpCode] = T2.[SlpCode]
WHERE T0.[CANCELED] = 'N'
ORDER BY T0.[DocNum]