解决方案: |
1、修改存货总帐IA_Summary调整一分钱尾差;
2、恢复单据记帐,取消调拨单的审核,重新以3月份时间审核单据,对帐正确
3、--原因是rdrecrod/s表与ia_subsidiary和ia_summary表中的记录的数据不一致。据用户要求按库存现有数量进行更改。由于空间有限只截取了部分修正存货总帐表数据的语句详细情况请参考51024问题:
--更新存货总帐非零月份结存数量与结存金额不正确的记录由于调整了存货总帐期初数据,所以造成以后月份结存数量与结存金额不正确
declare @chstartrq as int,@imonth as int
set @chstartrq=select monthcvalue from accinformation where cname='dIAStartDate'
set @imonth=0
while @chstartrq+@imonth<13
begin
update IA_Summary
set IA_Summary.inum=roundisnulla.inum,0+isnullIA_Summary.iinum,0-isnullIA_Summary.ionum,0,4,
IA_Summary.imoney=roundisnulla.imoney,0+isnullIA_Summary.iimoney,0-isnullIA_Summary.iomoney,0,4
from IA_Summary a join ia_summary on a.cwhcode=IA_Summary.cwhcode and a.cinvcode=IA_Summary.cinvcode
where a.imonth=case when IA_Summary.imonth=@chstartrq then 0 else @chstartrq+@imonth-1 end
and IA_Summary.imonth=@chstartrq+@imonth
set @imonth=@imonth+1
end |