|
问题现象:在用友8.52erp系统中用友U8版本号:U8.52软件的财务系统产品线固定资产模块出现如下问题:固定资产卡片与固定资产总帐不一致:固定资产卡片管理中的数据是正确的与总帐一致,但是在对帐中显示不平。请帮忙解答!
原因分析:固定资产总帐FA_TOTAL表与固定资产折旧数据表不一致,导致对帐不平。
解决方案:在用友erp 系统版本U8.52软件中解决办法及步骤:一、删除1月份固定资产凭证及1月份新增的资产卡片;二、生成临时数据表:selectscardnum,max(scardid)asscardidintotempdb..scidfromfa_cardsgroupbyscardnumselectb.sDeptNum,b.sTypeNum,sum(dblMonthValue)asycyz,sum(dblPeriodValue)asqcyz,sum(dblMonthDeprTotal)asyclj,sum(dblPeriodDeprTotal)asqclj,SUM(dblDepr1)ASbyzjintotempdb..qcsjfromfa_DeprTransactionsainnerjoin(selectscardnum,sDeptNum,sTypeNumfromfa_cardswherescardidin(selectscardidfromtempdb..scid))bona.scardnum=b.scardnumgroupbyb.sDeptNum,b.sTypeNum三、在SQLSERVER企业管理器该帐套2006年度库FA_TOTAL表中增加一个字段“ID”,属性为标识字段,种子为1,自增量为1;四、在SQL查询分析器该帐套2006年度参照执行如下脚本,删除多余固定资产总帐表中多余的记录:deletefromfa_totalwhereidin(selectc.idfromfa_totalcleftjointempdb..qcsjdonc.sdeptnum=d.sdeptnumandc.stypenum=d.stypenumwhereiperiod=1andd.sdeptnumisnull)五、在SQLSERVER企业管理器该帐套2006年度库FA_TOTAL表中,删除FA_TOTAL表中第三步中增加的字段“ID”;六、在SQL查询分析器该帐套2006年度参照执行如下脚本,补充fa_total表中缺少的记录:--fa_total表中缺的记录:select*fromfa_totalcrightjointempdb..qcsjdonc.sdeptnum=d.sdeptnumandc.stypenum=d.stypenumwherec.sdeptnumisnull--补充fa_total表中缺的记录:INSERTINTO[fa_Total]([sDeptNum],[sTypeNum],[iPeriod],[lMonthCount],[lCount],[dblYearValue],[dblYearDeprTotal],[dblLastAccrualValue],[dblLastDepr],[dblLastAddValue],[dblLastDecValue],[dblLastWork],[dblLastWorkTotal],[dblWork],[dblWorkT],[dblMonthValue],[dblValue],[dblMonthDeprTotal],[dblDeprTotal],[dblAddValue],[dblDecValue],[dblTransInDeprTotal],[dblTransOutDeprTotal],[dblAccrualValue],[dblDepr])VALUES('04','02',1,1,1,18668.0,12611.05,0,0,0,0,0,0,0,0,18668.0,18668.0,12611.05,12611.05,0,0,0,0,0,0)七、在SQL查询分析器该帐套2006年度参照执行如下脚本,修复FA_TOTAL表中年初原值、年初累计折旧、月初原值、月初累计折旧、月末原值、月末累计折旧、本月计提折旧等字段的数据:updatecsetdblYearValue=d.qcyz,dblMonthValue=d.ycyz,dblYearDeprTotal=d.qclj,dblMonthDeprTotal=d.yclj,dblValue=d.qcyz,dblDeprTotal=qclj+byzj,dblDepr=d.byzjfromfa_totalcinnerjointempdb..qcsjdonc.sdeptnum=d.sdeptnumandc.stypenum=d.stypenumwhereiperiod=1八、补录1月份的新增卡片,进行后续业务处理即可。注意做好数据备份!!。
|
|