跳至主要內容

应付发票到期清单

五六零网校小于 1 分钟

示例代码

SELECT t0.DocNum, t0.DocDate, t0.CardName, t0.DocTotal - t0.vatsum AS '金额'
	, DATEDIFF(dd, t0.docdate, GETDATE()) AS '账期'
FROM OPCH t0
	LEFT JOIN OCRD t1 ON t0.CardCode = t1.CardCode
WHERE t0.DocStatus = 'o'
ORDER BY DocNum