【问题现象】:
科目明细账跨年查询,凭证重复

【问题解决】:
备份数据,选择账套库,执行脚本
truncate table AA_ParentAccount
insert into AA_ParentAccount (idParent,idSon,Depth,isEndNode)
select p.id as idParent,s.id as idSon,p.depth-1 as Depth,p.IsEndNode as isEndNode from AA_Account p
left join AA_Account s
on s.code like p.code+'%' and s.isEndNode =1 and s.accountingyear=p.accountingyear
GO
截屏,微信识别二维码
客服QQ:5151867
(点击QQ号复制,添加好友)