用友U8 | 暂估材料余额表 会计年度不全 ,会计年度选择不到2021年度
脚本解决:在后台数据库,选中对应的账套,执行脚本语句即可;
补充:选择的数据库是ufdata开头的数据库
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')