解决方案_固定资产折旧生成凭证金额不对
金蝶云社区-Mr_Kobo
Mr_Kobo
0人赞赏了该文章 2,756次浏览 未经作者许可,禁止转载编辑于2016年01月31日 14:35:29
summary-icon摘要由AI智能服务提供

文本介绍了两种关于固定资产折旧的问题及其解决步骤。一是借贷方不等但折旧费用分配与折旧维护金额一致时,需检查折旧分录与折旧维护界面的一致性,不一致则备份并删除无对应卡片的记录。二是折旧凭证金额与折旧维护金额不一致时,需排查折旧分配表或卡片折旧分摊信息的问题,通过SQL查询和更新数据来解决金额不一致或分配信息缺失的问题。

现象一:借贷方不等,折旧费用分配表和折旧维护金额一致。--第一步,检查折旧维护中的金额是否和折旧费用分配表中的一致。若一致则第二步。--第二步,查询折旧分录条数以及总金额,看条数和金额是否与折旧维护界面显示的一致,不一致则第三步。select count(*),sum(fdepreciation)from t_Fa_fadepreciationentry whereflnkfadepreentry in (select fid from t_Fa_fadepreciationwhere fcompanyid in (select fid from t_org_company where fnumber='公司编码')and fperiod in (select fid fromt_bd_period where fnumber=期间编码 ))--第三步,不一致,查询折旧维护中没有对应卡片的记录备份并删除--备份select * into bak_0618 from t_Fa_fadepreciationentry whereflnkfadepreentry in (select fid from t_Fa_fadepreciationwhere fcompanyid in (select fid from t_org_company where fnumber='公司编码')and fperiod in (select fid fromt_bd_period where fnumber=期间编码))and ffacurcardid not in (select fidfrom t_fa_facurcard where fcompanyid in (select fid from t_org_company wherefnumber='公司编码') )--删除delete from t_Fa_fadepreciationentry where fid in (selectfid from bak_0618)现象二:折旧生成的凭证的金额和折旧维护里的金额不一致。排查:后台查询折旧分录的本期折旧额和折旧维护前台显示的一样,后台查询折旧分配表的分配金额合计与生成的凭证的数据一致,与折旧分录中的本期实提折旧不一致。即前台可看到折旧维护和折旧分配表的金额不一致。原因:折旧分配表里的分配金额错误或者存在卡片没有折旧分摊信息导致没有生成折旧分配表。解决方式:对于金额不正确的更新折旧分配表数据与折旧维护一致;对于折旧分配信息没有生成的找到卡片,变更补上折旧分摊信息再重提折旧。脚本如下:--1查询折旧表fidselect fid from t_fa_fadepreciationwhere fcompanyid=(select fid from t_org_company where fnumber='公司编码')and fperiod in(select fid fromt_bd_period where fnumber=期间编码)--2查询折旧分录的本期折旧额合计select count(*) 条数,sum(fdepreciation) 金额 from t_fa_fadepreciationentry where flnkfadepreentry='1中查出来的fid'--3查询折旧分配表的本期折旧额合计select count(*) 条数,sum(famount) 金额 from t_fa_fadepdistribute where fdepentryidin (select fid from t_fa_fadepreciationentry where flnkfadepreentry='1中查出来的fid')--4.1若第二步和第三步查出来的条数相等,金额对不上,则需要更新折旧分配表的金额update t_fa_faDepdistribute a setfamount=(select fdepreciation fromt_Fa_fadepreciationEntry b where b.fid=a.fDepentryid and b.FlnkFaDepreEntry=(select fid from t_fa_fadepreciationwhere fcompanyid=(select fid from t_org_company where fnumber='公司编码')and fperiod in (select fid fromt_bd_period where fnumber=期间编码)))--4.2第二步和第三步查出来的条数对不上,则存在折旧分录没有生成对应的折旧分配表。找出没有生成折旧分配表的卡片记录select * from t_Fa_Facurcard wherefid in (select ffacurcardid fromt_fa_Fadepreciationentry where flnkfadepreentry='1中查出来的fid'and fid in (select fdepentryid fromt_Fa_Fadepdistribute where fdepentryid in (select fid from t_fa_fadepreciationentry where flnkfadepreentry='1中查出来的fid')))--查出来后通过卡片编码去前台查询固定资产卡片,看卡片上是否有折旧分摊信息。没有的话变更卡片,补上折旧分摊信息,再重提折旧。在已知是某张卡片造成差额的情况下--1查询折旧表fidselect fid from t_fa_fadepreciationwhere fcompanyid=(select fid from t_org_company where fnumber='公司编码')and fperiod in(select fid fromt_bd_period where fnumber=期间编码)--2查询该卡片折旧分录的本期折旧额select fdepreciation fromt_fa_fadepreciationentry whereflnkfadepreentry='1中查出来的fid'and ffacurcardid in ('造成差额的那张卡片的fid') --注:在固定资产卡片序时簿界面查出来卡片后,选中按ctrl+shift+c可复制卡片的fid)--3查询该卡片折旧分配表的本期折旧额select famount fromt_fa_fadepdistribute where fdepentryid in ('cEEcYMcoT5Chms62HFmkZD6wSGE=') (select fid from t_fa_fadepreciationentry where flnkfadepreentry='cXcAAAFEvMX9R8KR')--4第二步和第三步查出来的数值对不上,则需要更新该卡片折旧分配表的金额update t_fa_faDepdistribute a setfamount=(select fdepreciation fromt_Fa_fadepreciationEntry b where b.fid=a.fDepentryid and b.FlnkFaDepreEntry=(select fid from t_fa_fadepreciationwhere fcompanyid=(select fid from t_org_company where fnumber='02')and fperiod in (select fid fromt_bd_period where fnumber=201411)))where fdepentryid in ('造成差额的那张卡片的fid')