关于U8科目说明,及致远OA集成U8科目在新增科目后不显示问题及处理
1.U8科目表为code表,U8科目是按年进分配的,也就是不同会计期间年的会计科目是不相同的。
2.当我们OA和U8集成后,所以需要注意的是我们OA是对应U8会计期间来进行集成的,所以这里需要注意集成时是否是取全表,还是按我们会计期间来处理。否则会出现如果按会计期间,一部份会计科目无法读取
3.采用后台数据库操作,在不能结转当前会计期间时,我们通过把新增会计科目添加到能显示会计科目期间处理:
我这里以22年和23年为例,处理23年新加会计科目不显示,原理为将23年科目新增到22年,注意:22年最好是已结账状态。
--查询会计科目23年和22年的差异,并写到临时表
select a.* from (select * from code where iyear='2023') A left join (select * from code where iyear='2022') B on a.ccode=b.ccode where b.ccode is null
select a.* into #A230629 from (select * from code where iyear='2023') A left join (select * from code where iyear='2022') B on a.ccode=b.ccode where b.ccode is null
select * from #A230629
---将23年会计科目更新为22年
update #A230629 set iyear='2022'
--打开显示更新
set IDENTITY_INSERT code ON
--显示字段值进行插入会计科目表
insert INTO code(cclass, cclass_engl, cclassany, cclassany_engl, ccode, ccode_name, ccode_engl, igrade, bproperty,
cbook_type, cbook_type_engl, chelp, cexch_name, cmeasure, bperson, bcus, bsup, bdept, bitem, cass_item, br, be,
cgather, bend, bexchange, bcash, bbank, bused, bd_c, dbegin, dend, itrans, bclose, cother, iotherused, bcDefine1,
bcDefine2, bcDefine3, bcDefine4, bcDefine5, bcDefine6, bcDefine7, bcDefine8, bcDefine9, bcDefine10, iViewItem, bGCJS,
bCashItem, bcDefine11, bcDefine12, bcDefine13, bcDefine14, bcDefine15, bcDefine16, bReport,
cUserDefineType, iyear, dModifyDate, bparacc)
select cclass, cclass_engl, cclassany, cclassany_engl, ccode, ccode_name, ccode_engl, igrade, bproperty,
cbook_type, cbook_type_engl, chelp, cexch_name, cmeasure, bperson, bcus, bsup, bdept, bitem, cass_item, br, be,
cgather, bend, bexchange, bcash, bbank, bused, bd_c, dbegin, dend, itrans, bclose, cother, iotherused, bcDefine1,
bcDefine2, bcDefine3, bcDefine4, bcDefine5, bcDefine6, bcDefine7, bcDefine8, bcDefine9, bcDefine10, iViewItem, bGCJS,
bCashItem, bcDefine11, bcDefine12, bcDefine13, bcDefine14, bcDefine15, bcDefine16, bReport,
cUserDefineType, iyear, dModifyDate, bparacc from #A230629
--关闭显示更新
set IDENTITY_INSERT code off
--删除临时表
drop table #A230629
---pubufts 时间戳字段