用友T6软件应收应付核销后生成的凭证借贷不平可能的原因用友软件应收应付借贷不平可能的原因
1、文章标题:应收系统如果核销后生成的凭证借贷方不平的可能原因。
8.21版应收系统如果核销后生成的凭证借贷方不平,而且差别很大,有可能是此次核销的发票余额不对。此数据的问题在于客户“shxg”的4张发票在salebillvouchs表的imoneysum,iexchsum字段和Ap_Detail表的icamount不一致,造成在应收系统中查寻发票时显示的发票余额错误。以下是修改此数据的脚本,仅供参考。
SELECT ibvid,icamount into a
FROM Ap_Detail
WHERE (cCoVouchID = '0000000222')
AND (cDwCode = 'shxg')
AND (cVouchType = '48')
ORDER BY iBVid
SELECT AutoID,imoneysum,iexchsum into b
FROM SaleBillVouchs
WHERE (SBVID = '222')
ORDER BY AutoID
update salebillvouchs
setimoneysum=0,iexchsum=0
where salebillvouchs.autoid in(
select b.AutoID
from b left join aon b.autoid=a.ibvid
where a.ibvid is null )
update salebillvouchs
setimoneysum=2220.6200,iexchsum=2220.6200
where salebillvouchs.and (SBVID = '222')
update salebillvouchs
setimoneysum=31510.6200,iexchsum=31510.6200
where salebillvouchs.and (SBVID = '222')
update salebillvouchs
setimoneysum=12734.0600,iexchsum=12734.0600
where salebillvouchs.and (SBVID = '222')
update Ap_Detail
set iCAmount =35106.75
where ibvid='2527' AND(cVouchType = '48')
update Ap_Detail setiCAmount_f=iCAmount
WHERE (cVouchID = '0000000420') AND (cDwCode = 'shxg') AND
(cCoVouchID = '0000000222') and ibvid=2527
UPDATE salebillvouchs
SET imoneysum = 0, iexchsum = 0
FROM salebillvouchs AS a
WHERE a.sbvid = '305' or a.sbvid = '295'
drop table a
drop table b