百科问答

百科问答 国内资讯 公司资讯 政策法规 培训资料 产品下载

T3-10.8Plus2客户核销制单的借贷方金额不一致

发布时间:2026-5-2 

特价活动:>>>> 用友U8、T6、T+、T3软件产品4折优惠,畅捷通T+cloud、好会计、好业财、好生意云产品8折优惠,另有话费赠送。

 

问题描述:

客户:厦门宏发开关设备有限公司和厦门金越电器有限公司这2个客户在核销制单生成凭证的界面上借贷方金额不一致无法保存,不知道什么原因造成的!此类问题等同于之前提过的问题号:T3-72212.请麻烦检查一下其他客户是否也存在此类问题!


问题回复:

步骤如下: 1、备份数据 2、取消核销 3、执行脚本 4、重新核销制单即可

发票的累计核销金额不对,重算发票的累计核销金额

declare @VouchID as varchar(100)declare @VouchType as varchar(100)declare @cDwCode as varchar(100)declare @RAmount as floatdeclare @AutoID as intdeclare @ExchSum as floatdeclare UpdateData cursor forselect cVouchID,AA.cVouchType,AA.cDwCode,BB.iSum-AA.iRAmount_f CC--,AA.iRAmount_f--,BB.iSum,BB.iExchSum,BB.iSum-BB.iExchSum 发票余额,BB.iSum-BB.iExchSum-AA.iRAmount_f,AA.*from (SELECT * FROM AR_cancel1 Where cExch_Name='人民币' and (cVouchType IN('26','27','28','29') --OR cVouchType Like 'R%' ) And cSign='Z' And iRAmount_f<>0 ) AA left join (select cSBVCode,cVouchType,cCusCode,sum(b.iSum) iSum,sum(b.iExchSum) iExchSum from salebillvouch a inner join salebillvouchs b on a.sbvid=b.sbvidgroup by cSBVCode,cVouchType,cCusCode) BB on AA.cVouchID=BB.cSBVCode and AA.cVouchType=BB.cVouchType and AA.cDwCode=BB.cCusCodewhere abs(BB.iSum-BB.iExchSum-AA.iRAmount_f) > 0.0000001open UpdateDatafetch next from UpdateData into @VouchID,@VouchType,@cDwCode,@RAmountwhile(@@FETCH_STATUS=0)begindeclare UpdateSB cursor forselect sbs.autoid,sbs.iSum from SaleBillVouch sbinner join SaleBillVouchs sbs on sb.SBVID=sbs.SBVIDwhere sb.cSBVCode=@VouchID and sb.cVouchType=@VouchType and sb.cCusCode=@cDwCodeopen UpdateSBfetch next from UpdateSB into @AutoID,@ExchSumwhile(@@FETCH_STATUS=0)beginif (@RAmount > @ExchSum)beginupdate SaleBillVouchs set iMoneySum=@ExchSum,iExchSum=@ExchSum where AutoID=@AutoIDset @RAmount = @RAmount - @ExchSumendelsebeginupdate SaleBillVouchs set iMoneySum=@RAmount,iExchSum=@RAmount where AutoID=@AutoIDset @RAmount = 0endfetch next from UpdateSB into @AutoID,@ExchSumendclose UpdateSBdeallocate UpdateSBfetch next from UpdateData into @VouchID,@VouchType,@cDwCode,@RAmountendclose UpdateDatadeallocate UpdateData

X畅捷通软件官方正版.用友软件.企业云服务

截屏,微信识别二维码

客服QQ:5151867

(点击QQ号复制,添加好友)