解决方案: |
您好, 此问题【经查看数据/测试】现做如下分析与答复: 问题1、对于应收辅助帐差2万多的问题,可参照如下脚本与上年底对比看哪些记录存在问题: --检查06年少的应收明细记录: select * from ufdata_111_2006..GL_ACCASS a left join (select * from ufdata_111_2005..gl_accass where ccode='113121' AND IPERIOD=12) b on a.ccus_id=b.ccus_id and a.citem_id=b.citem_id where a.ccode='113121' AND a.IPERIOD=1 and b.ccode is null --检查06年多的应收明细记录: select * from ufdata_111_2006..GL_ACCASS A right join (select * from ufdata_111_2005..gl_accass where ccode='113121' AND IPERIOD=12) b on a.ccus_id=b.ccus_id and a.citem_id=b.citem_id where a.ccode='113121' AND a.IPERIOD=1 and a.ccode is null --检查06年与05年底金额不等的应收明细记录: select * from ufdata_111_2006..GL_ACCASS A inner join (select * from ufdata_111_2005..gl_accass where ccode='113121' AND IPERIOD=12) b on a.ccus_id=b.ccus_id and a.citem_id=b.citem_id where a.ccode='113121' AND a.IPERIOD=1 and (a.cbegind_c<>b.cend_c or a.mb<>b.me) 对于进入辅助明细提示内存益出的问题开发已提供补丁,请从支持网站下载并安装852最新HOTFIX、DBHOTFIX即可。 问题2、用户的数据库AP_DETAIL表中有许多单据的记录其单据日期/、审核日期等与IPERIOD会计期间并不一致,业务明细帐是根据日期统计的,帐岭分析是根据会计期间进行统计的,所以导致两边数据不一致。参照执行如下脚本可查询这些异常的记录: select * from ap_detail where month(dRegDate)<>iperiod and dvouchdate>'2005-12-31 00:00:00.000' 请确定这些异常的单据记录是否跟用户二次开发程序有关并检查修复二次开发程序中的相关脚本。针对用户手工录入的单据最好在当月进行审核、制单等操作,以避免由于期间不一致引起的类似问题。 附:问题2分析过程: --业务余额表查询过程 select sum(idamount),sum(icamount) --select * into temp01 From Ap_DetailCust where (iflag<>'' And cDwCode <>'' And cDwCode>='1009' And cDwCode<='1009' And (cCode>='113121' or cCode like '113121%') And (cCode<='113121' or cCode like '113121%') And dRegDate<='2006-1-31' And not cCoVouchType like '4%' And cProcStyle<>'9H') or (iflag<>'' And cDwCode <>'' And cDwCode>='1009' And cDwCode<='1009' And (cCode>='113121' or cCode like '113121%') And (cCode<='113121' or cCode like '113121%') And dRegDate<='2006-1-31' And cCoVouchType like '4%' And cProcStyle<>'9H') --帐龄分析查询过程: select sum(idamount),sum(icamount) --select * into temp02 FROM Ap_DetailCust WHERE iperiod<=1 And (cCode>='113121' or cCode like '113121%') And (cCode<='113121' or cCode like '113121%') AND (iperiod=0 or cpzid is not null) And cDwCode>='1009' And cDwCode<='1009' AND iflag<>iperiod and dvouchdate>'2005-12-31 00:00:00.000' |