委外入库单据无法核销的处理方法
1、查询无法核销的单据数据
SELECT t1.FArapStatus ,--单据核销状态(Y(1):完全核销,P(2):部分核销;N(0):未核销)
t1.FBillNo ,
t1.FEntryID ,
k1.FSInterID ,
k1.FSEntryID ,
SUM(k1.FQty) AS FQty ,--核销数量
SUM(k1.FAmount) AS FAmount --核销金额
FROM ICClientVer k1 --委外核销表
LEFT JOIN ( SELECT v1.FInterID ,
v1.FBillNo ,
u1.FEntryID ,
( CASE u1.FCheckStatus
WHEN 1 THEN 'Y'
WHEN 2 THEN 'P'
ELSE 'N'
END ) AS FArapStatus--单据核销状态
FROM ICStockBill v1
RIGHT JOIN dbo.ICStockBillEntry u1 ON v1.FInterID = u1.FInterID
) t1 ON ( k1.FSInterID = t1.FInterID
AND k1.FSEntryID = t1.FEntryID
)
WHERE t1.FInterID IN ( SELECT FInterID
FROM dbo.ICStockBill
WHERE FBillNo LIKE '%000120%' )
GROUP BY t1.FArapStatus ,
t1.FBillNo ,
t1.FEntryID ,
k1.FSInterID ,
k1.FSEntryID
ORDER BY k1.FSInterID ,
k1.FSEntryID
委外入库单据无法核销的处理方法
本文2024-09-16 15:51:01发表“k3wise知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3wise-5464.html