|
问题现象:在用友8.52erp系统中用友U8版本号:U8.52软件的供应链产品线存货核算模块出现如下问题:升级后存货中暂估余额表不正确,而且报销金额与红字回冲单的金额合计的绝对值不等。请帮忙解答!
原因分析:由于以前版本的入库单上没有填实际金额的,在记帐时暂估金额为空,导致结算后结算单上的暂估金额也为空,使得查询错误。
解决方案:在用友erp 系统版本U8.52软件中可以使用下面的脚本在查询分析器中针对错误帐套进行更改:updateasetiaprice=ipprice,facost=ipunitcostfromrdrecordsainnerjoinia_subsidiarybona.autoid=b.idwhereb.cvoutypein('01','33')andbflag2andcwhcode'01'andisnull(idebitdifcost,0)=0andisnull(icreditdifcost,0)=0andisnull(a.iaprice,0)isnull(iainprice,0)updateasetiaprice=iprice,facost=iunitcost--selectiprice,iaprice,ipprice,isnull(b.iainprice,0),isnull(idebitdifcost,0),isnull(icreditdifcost,0),*fromrdrecordsainnerjoinia_subsidiarybona.autoid=b.idwhereb.cvoutypein('01','33')andbflag2andcwhcode'01'and(isnull(idebitdifcost,0)0orisnull(icreditdifcost,0)0)andisnull(a.iaprice,0)(isnull(b.iainprice,0)+isnull(idebitdifcost,0)-isnull(icreditdifcost,0))updaterdrecordssetimoney=CONVERT(DECIMAL(20,2),iaprice)whereconvert(decimal(20,4),iquantity)=convert(decimal(20,4),isquantity)andisnull(imoney,0)iapriceupdaterdrecordssetimoney=convert(decimal(20,2),isquantity*facost)whereautoidin(selectautoidfromrdrecordswhereiquantityisnull(isquantity,0)andisnull(isquantity,0)0)updatepursettlevouchssetisvacost=rdrecords.facostfrompursettlevouchsleftjoinrdrecordsonrdrecords.autoid=pursettlevouchs.irdsidwhereisnull(pursettlevouchs.isvquantity,0)0updatepursettlevouchssetisvaprice=convert(decimal(20,2),isnull(isvquantity,0)*isnull(isvacost,0))。
|
|