問題描述:存貨核算模塊,憑證處理,查詢憑證時,會計年度選擇不到2021年度?

原因分析:用友產品后台程序只寫到2020年(2001-2020 20年)
select * from aa_enum where EnumType=N'IA.iYear'


處理方法:
1、補丁解決:(由於沒有交服務費,所以。。。放棄)

2、腳本解決:在后台數據庫,選中對應的賬套,執行腳本語句即可;
補充:選擇的數據庫是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') 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')
