解决方案: |
1。存货模块收发存汇总表的数据和对帐界面中查询出的存货数据不一致的问题。
原因:a.一部分单据没有生成凭证,造成这些没有对应凭证的单据不会在对帐时统计出来,造成了和收发存汇总表的差额。并且其中一部分是由2003年没有生成凭证的单据度结转过来的期初数据。
b.一部分单据在生成凭证时修改了科目,造成一些单据虽然生成了凭证但是使用了错误的科目,这些科目不符合存货科目设置中仓库和科目的对应关系,导致对帐时统计的结果不准确。 附件中sql脚本可以统计出具体错误的数据,按照您的要求列举出4个科目的错误。
2。采购模块暂估余额跟总账对不上的问题。
原因:仓库全部是计划价核算方式,一部分暂估入库单单据上没有暂估单价和暂估金额,暂估记账时按照计划价记账,按照计划价计算的金额生成了凭证,但是在货到票未到明细表中暂估金额是零,导致此问题。
--1211001科目
--没有生成凭证的差额
Select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where cwhcode in('ck06','ck07','ck08','ck09','ck10','ck11','ck12','ck13','ck14','ck36')
and cPZID is null
and cInvHead is null
and not caccounter=' '
--科目和仓库不对应
select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where cwhcode in('ck06','ck07','ck08','ck09','ck10','ck11','ck12','ck13','ck14','ck36')
and not cPZID is null
and not cInvHead is null
and not caccounter=' '
and cinvhead<>1211001
Select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where not cPZID is null
and not cInvHead is null
and cinvhead=1211001
and cwhcode not in('ck06','ck07','ck08','ck09','ck10','ck11','ck12','ck13','ck14','ck36')
--1211002科目
--没有生成凭证的差额
Select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where (cwhcode='ck19' or cwhcode='ck20') and cPZID is null
and cInvHead is null and not caccounter=' '
--1241科目
--没有生成凭证的差额
Select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where cwhcode='ck21'
and cPZID is null
and cInvHead is null
and not caccounter=' '
--1243科目
--没有生成凭证的差额
Select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where cwhcode in ('ck01','ck02','ck03','ck04','ck05','ck29','ck31','ck34','ck35')
and cPZID is null
and cInvHead is null
and not caccounter=' '
--科目和仓库不对应
select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where cwhcode in ('ck01','ck02','ck03','ck04','ck05','ck29','ck31','ck34','ck35')
and not cPZID is null
and not cInvHead is null
and not caccounter=' '
and cinvhead<>1243
Select sum(cast(isnull(iAInPrice,0)-isnull(iAOutPrice,0) as float)) as QcPrice
from ia_subsidiary
where not cPZID is null
and not cInvHead is null
and cinvhead=1243
and cwhcode not in ('ck01','ck02','ck03','ck04','ck05','ck29','ck31','ck34','ck35') |