找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

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

[经验] 查询报表或凭证时,会计年度不显示2021年度的解决方法

[复制链接]
发表于 2021-6-17 10:19:03 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 纪红丰 于 2021-6-17 13:32 编辑


                               
登录/注册后可看大图

执行以下脚本即可,脚本中是增加了10年的,也可以打最新的IA补丁解决,属于U8 的bug


    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2021' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2021,N'zh-cn',2021,21,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2022' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2022,N'zh-cn',2022,22,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2023' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2023,N'zh-cn',2023,23,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2024' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2024,N'zh-cn',2024,24,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2025' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2025,N'zh-cn',2025,25,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2026' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2026,N'zh-cn',2026,26,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2027' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2027,N'zh-cn',2027,27,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2028' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2028,N'zh-cn',2028,28,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2029' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2029,N'zh-cn',2029,29,N'U870')
    if not exists(select EnumType from aa_enum where EnumType=N'IA.iYear' and  enumcode=N'2030' and LocaleId=N'zh-cn')
    insert into aa_enum  (EnumType,EnumCode,LocaleId,EnumName,EnumIndex,cProjectNO)values(N'IA.iYear',2030,N'zh-cn',2030,30,N'U870')



发表于 2021-6-17 13:40:54 | 显示全部楼层
值得收藏!
回复 点赞 拍砖

使用道具 举报

发表于 2021-6-18 09:05:51 | 显示全部楼层
不明白开发总喜欢留个后门或者bug,给自己找存在感吗?感谢楼主的语句,值得收藏
回复 点赞 拍砖

使用道具 举报

发表于 2021-6-18 17:15:41 | 显示全部楼层
开发手写的年度,也是够辛苦的了
回复 点赞 拍砖

使用道具 举报

发表于 2021-6-21 09:29:37 | 显示全部楼层
先收藏了,感谢楼主的无私奉献
回复 点赞 拍砖

使用道具 举报

发表于 2021-7-2 12:17:22 | 显示全部楼层
-----------------------选择需要执行脚本的账套库-----------------------
----------------------一次性增加会计年度到2099年---------------
------------------------制作者:猥琐的紫夜-----------------------------

declare @i int
set @i=20
while @i<=99
begin
        declare @enumcode varchar(4)
        set @enumcode='20'+ cast(@i as varchar)

        ---------删除已经存在的会计年度---------
        delete from dbo.AA_Enum where EnumType=N'IA.iYear' and enumcode = @enumcode

        ---------增加新的会计年度--------
        INSERT INTO [dbo].[AA_Enum]([EnumType],[EnumCode],[LocaleId],[EnumName],[EnumIndex],[cProjectNO])
        VALUES('IA.iYear',@enumcode,'zh-cn',@enumcode,@i,'U870')
        INSERT INTO [dbo].[AA_Enum]([EnumType],[EnumCode],[LocaleId],[EnumName],[EnumIndex],[cProjectNO])
        VALUES('IA.iYear',@enumcode,'en-Us',@enumcode,@i,'U870')
        INSERT INTO [dbo].[AA_Enum]([EnumType],[EnumCode],[LocaleId],[EnumName],[EnumIndex],[cProjectNO])
        VALUES('IA.iYear',@enumcode,'zh-tw',@enumcode,@i,'U870')

        set @i=@i+1
end

点评

多谢大神,执行了  发表于 2022-1-14 12:57
编译报错啊  详情 回复 发表于 2022-1-14 12:54
回复 点赞 拍砖

使用道具 举报

发表于 2022-1-14 12:54:11 | 显示全部楼层
本帖最后由 wxllv 于 2022-1-14 12:56 编辑
wa911126 发表于 2021-7-2 12:17
-----------------------选择需要执行脚本的账套库-----------------------
----------------------一次性 ...

多谢多谢
回复 点赞 拍砖

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-4-25 20:23 , Processed in 0.049482 second(s), 9 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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