服务热线:022-26677809 , 13821206318
坚守“用户之友”的初心,做“专业的奋斗者”,始终坚持“持续创新”
首页 > 知识库 > 正文

材料暂估材料余额表每月累计相差0.75元

- 浏览:1684 - 发布时间:2008-10-21 09:14:52.0
问题版本: 85-U6普及版3.2 问题模块: 21-核算管理
所属行业: 0-通用 问题状态: 1-UU通注册用户
关 键 字: 相差几分钱 适用产品:
补 丁 号: 开放状态: 0-UU通注册用户
原问题号: 提交时间: 2008-10-21 9:14:52
问题名称: 材料暂估材料余额表每月累计相差0.75元
问题现象: 一数据是从通升级到U6 plus1 中发现材料暂估材料余额表累计相差0.75元。经核对升级后的数据次月初数据总与当月末数据相差几分钱。(原通数据不存在此问题。)
原因分析: 升级前版本软件与现有软件对金额尾数计算方法不一致,导致计算尾差累计。
解决方案: 将现有数据按照正确算法重新更新。 update b set iaprice=convert(decimal(20,2),isnull(iprice,0)) from ia_subsidiary a inner join rdrecords b on a.id=b.autoid where cvoutype='01' and bflag=1 and isnull(iaprice,0)<>isnull(iprice,0) update b set facost=convert(decimal(20,2),isnull(iaprice,0))/iquantity from rdrecord a inner join rdrecords b on a.id=b.id where cvouchtype='01' and iaprice is not null and caccounter is not null update rdrecords set imoney=CONVERT(DECIMAL(20,2),iaprice) where convert(decimal(20,4),iquantity)=convert(decimal(20,4),isquantity) and isnull(imoney,0)<>iaprice update rdrecords set imoney=convert(decimal(20,2),isquantity*facost) where autoid in(select autoid from rdrecords where iquantity <> isnull(isquantity,0) and isnull(isquantity,0)<>0) update a set isvacost=b.facost from pursettlevouchs a left join rdrecords b on b.autoid=a.irdsid update a set isvaprice=convert(decimal(20,2),isvquantity*isvacost) from pursettlevouchs a left join rdrecords b on b.autoid=a.irdsid where isnull(a.isvquantity,0)<>isnull(b.isquantity,0) update a set isvaprice=convert(decimal(20,2),b.imoney) from pursettlevouchs a left join rdrecords b on b.autoid=a.irdsid where isnull(a.isvquantity,0)=isnull(b.isquantity,0)