找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 51|回复: 0

凭证管理界面不显示全级次科目应如何操作?

[复制链接]
发表于 2023-6-30 21:14:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
T+-总账

               
                    【业务场景】

填制凭证时,凭证上会显示全级次科目,但是查询凭证管理时不显示全级次科目要如何操作?

                               
登录/注册后可看大图


【解决方案】

1、找到【基础设置】-【科目】界面

                               
登录/注册后可看大图


2、任意打开一个科目界面,点击保存按钮即可

                               
登录/注册后可看大图


3、保存科目后如仍有该现象,备份好账套数据,执行如下脚本后重新登录T+产品即可,脚本如下:

declare @currentyear int
set @currentyear=2022
update aa_account set idparent=(select id from (select id,substring(code,1,4) code,accountingyear from aa_account where code in
(select substring(code,1,4) from aa_account where LEN(code)=6 ) and accountingyear=@currentyear
) as a where aa_account.depth=2 and aa_account.accountingyear=@currentyear and substring(aa_account.code,1,4)=a.code)
where depth=2 and accountingyear=@currentyear
update aa_account set idparent=(select id from (select id,substring(code,1,6) code,accountingyear from aa_account where code in
(select substring(code,1,6) from aa_account where LEN(code)=8) and accountingyear=@currentyear
) as a where aa_account.depth=3 and aa_account.accountingyear=@currentyear and substring(aa_account.code,1,6)=a.code)
where depth=3 and accountingyear=@currentyear
update aa_account set idparent=(select id from (select id,substring(code,1,8) code,accountingyear from aa_account where code in
(select substring(code,1,8) from aa_account where LEN(code)=10) and accountingyear=@currentyear
) as a where aa_account.depth=4 and aa_account.accountingyear=@currentyear and substring(aa_account.code,1,8)=a.code)
where depth=4 and accountingyear=@currentyear
declare @MaxDepthValue int
declare @CurrentDetphValue int
set @maxDepthValue=(select MAX(depth) from AA_Account where accountingyear=@currentyear)
set @CurrentDetphValue=1
while(@CurrentDetphValue
begin
if(@CurrentDetphValue=1)
begin
update AA_Account set inId = CONVERT(varchar(36),id) where depth=1 and accountingyear=@currentyear
end
else if (@CurrentDetphValue=2)
begin
update AA_Account set inId =CONVERT(varchar(36),idParent) + '_' + CONVERT(varchar(36),id) where depth=2 and accountingyear=@currentyear
end
else if (@CurrentDetphValue >2)
begin
update AA_Account set inId =(select distinct CONVERT(varchar(max),inid) from AA_Account A where A.id=AA_Account.idParent and A.depth=AA_Account.depth-1 ) + '_' + CONVERT(varchar(36),id)
from AA_Account where depth=@CurrentDetphValue and accountingyear=@currentyear
end
set @CurrentDetphValue=@CurrentDetphValue+1
end
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|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-5-5 20:45 , Processed in 0.018954 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表