方法1.如果有独立数据库,压缩数据库
方法2.修正核算项目关系
select * from t_itemdetail
exec sp_cleanitemdetailv
GO
update a set a.fdetailcount=b.Fcount
from t_itemdetail a join (select Fdetailid,count(*) as Fcount from t_itemdetailv where fitemid=-1 group by Fdetailid) b
on a.fdetailid=b.fdetailid where a.fdetailcount<>b.Fcount
方法3.把凭证部分分开过账,找到无法过账的凭证共同点,新增代码或核算项目,把凭证修改到新的再尝试
试试数据库执行下这条语句
select * from t_itemdetail
exec sp_cleanitemdetailv
GO
update a set a.fdetailcount=b.Fcount
from t_itemdetail a join (select Fdetailid,count(*) as Fcount from t_itemdetailv where fitemid=-1 group by Fdetailid) b
on a.fdetailid=b.fdetailid where a.fdetailcount<>b.Fcount
如果别的帐套都好,就这一个出问题,那么需要给总部提交帐套处理,通过你的服务商就可以