未清应收发票查询
小于 1 分钟
示例代码
SELECT CASE
WHEN T0.[DocStatus] = 'O' THEN '未清'
WHEN T0.[DocStatus] = 'C' THEN '已结算'
END AS '单据状态', T2.[SlpName], T0.[DocNum], T0.[CardCode], T0.[CardName]
, T0.[TaxDate], T0.[DocDueDate], T1.[ItemCode], T1.[Dscription], T1.[Quantity]
, T1.[Price], T0.[DocTotal]
FROM OINV T0
INNER JOIN INV1 T1 ON T0.[DocEntry] = T1.[DocEntry]
INNER JOIN OSLP T2 ON T0.[SlpCode] = T2.[SlpCode]
WHERE T0.[CANCELED] = 'N'
ORDER BY T0.[DocNum]