用友U8 升级后存货中暂估余额表不正确,而且报销金额与红字回冲单的金额合计的绝对值不等。用友U8 升级后存货中暂估余额表不正确,而且报销金额与红字回冲单的金额合计的绝对值不等。
问题原因:由于以前版本的入库单上没有填实际金额的,在记帐时暂估金额为空,导致结算后结算单上的暂估金额也为空,使得查询错误 解决方法:可以使用下面的脚本在查询分析器中针对错误帐套进行更改: update a set iaprice=ipprice,facost=ipunitcost from rdrecords a inner join ia_subsidiary b on a.autoid=b.id where b.cvoutype in ('01','33') and bflag<>2 and cwhcode<>'01' and isnull(idebitdifcost,0)=0 and isnull(icreditdifcost,0)=0 and isnull(a.iaprice,0)<>isnull(iainprice,0) update a set iaprice=iprice,facost=iunitcost --select iprice,iaprice,ipprice,isnull(b.iainprice,0),isnull(idebitdifcost,0),isnull(icreditdifcost,0),* from rdrecords a inner join ia_subsidiary b on a.autoid=b.id where b.cvoutype in ('01','33') and bflag<>2 and cwhcode<>'01' and (isnull(idebitdifcost,0)<>0 or isnull(icreditdifcost,0)<>0) and isnull(a.iaprice,0)<>(isnull(b.iainprice,0)+isnull(idebitdifcost,0)-isnull(icreditdifcost,0)) 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 pursettlevouchs set isvacost=rdrecords.facost from pursettlevouchs left join rdrecords on rdrecords.autoid=pursettlevouchs.irdsid where isnull(pursettlevouchs.isvquantity,0)<>0 update pursettlevouchs set isvaprice=convert(decimal(20,2),isnull(isvquantity,0)*isnull(isvacost,0))
解决方案:
问题原因:由于以前版本的入库单上没有填实际金额的,在记帐时暂估金额为空,导致结算后结算单上的暂估金额也为空,使得查询错误 解决方法:可以使用下面的脚本在查询分析器中针对错误帐套进行更改: update a set iaprice=ipprice,facost=ipunitcost from rdrecords a inner join ia_subsidiary b on a.autoid=b.id where b.cvoutype in ('01','33') and bflag<>2 and cwhcode<>'01' and isnull(idebitdifcost,0)=0 and isnull(icreditdifcost,0)=0 and isnull(a.iaprice,0)<>isnull(iainprice,0) update a set iaprice=iprice,facost=iunitcost --select iprice,iaprice,ipprice,isnull(b.iainprice,0),isnull(idebitdifcost,0),isnull(icreditdifcost,0),* from rdrecords a inner join ia_subsidiary b on a.autoid=b.id where b.cvoutype in ('01','33') and bflag<>2 and cwhcode<>'01' and (isnull(idebitdifcost,0)<>0 or isnull(icreditdifcost,0)<>0) and isnull(a.iaprice,0)<>(isnull(b.iainprice,0)+isnull(idebitdifcost,0)-isnull(icreditdifcost,0)) 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 pursettlevouchs set isvacost=rdrecords.facost from pursettlevouchs left join rdrecords on rdrecords.autoid=pursettlevouchs.irdsid where isnull(pursettlevouchs.isvquantity,0)<>0 update pursettlevouchs set isvaprice=convert(decimal(20,2),isnull(isvquantity,0)*isnull(isvacost,0))
www.kuaiji66.com 天龙瑞德