用友软件结算成本处理时存货暂估处理失败

微信号:yyrjlls
技术咨询,有偿服务!
复制微信号
技术咨询,有偿服务!
复制微信号
原因分析:暂估方式是单到补差,在做结算成本处理时,系统会自动生成系统调整单。但ufsystem..ua_identity关于JU存在最大单据号的问题,且帐套有远程号的设置,最大ID需要把远程号去除,即ua_identity是不带远程号的ID、业务子表justinvouchs的ID是带远程号的,直接更改会超过7位重新编号,如果确实超了7位可以修改远程号使其重新编号
问题解答:--下面脚本目的是修改远程号并重新对justinvouchs编号declare @RemoteId char(2) Select @RemoteId=cValue FROM AccInformation where cSysID= N'AA' and cName= N'cID' if convert(int,@RemoteId)!=0 begin update ufsystem..ua_identity set ichildid=(select convert(int,max(substring(convert(varchar(10),autoid),3,len(autoid)-2))) from UFDATA_999_2013..justinvouchs) where cacc_id='999' and cvouchtype='JU' end