用友U8 13.0 凭证在后台数据库存储情况
作者:互联网
为了更快捷的取凭证数据,下面整理了凭证在填写,审核,记账之后 在后台表的存储情况。
实际上主要涉及到四个表 :凭证及明细账表gl_accvouch,科目总账表gl_accsum,辅助总账gl_accass,多辅助明细账汇总表GL_AccMultiAss。
测试脚本如下:
1 --凭证及明细账 2 select * from gl_accvouch where ino_id='0198' and iyear=2019 and YEAR(dbill_date)=2019 and iperiod=2 3 select * from gl_accvouch where ino_id='0199' and iyear=2019 and YEAR(dbill_date)=2019 and iperiod=2 4 -- 科目总账表 5 select * from gl_accsum where iyear=2019 and ccode = '10020101' 6 select * from gl_accsum where iyear=2019 and ccode = '213105' 7 select * from gl_accsum where iyear=2019 and ccode = '213106' 8 -- 辅助总账(该表不会存不带辅助核算的科目数据) 9 select * from gl_accass where iyear=2019 and ccode = '10020101' 10 select * from gl_accass where iyear=2019 and ccode = '213105' 11 select * from gl_accass where iyear=2019 and ccode = '213106' 12 13 select SUM(mb) as mb,SUM(md) as md,SUM(mc) as mc,SUM(me) as me from gl_accass where iyear=2019 and ccode = '10020101' and iperiod =2 14 select SUM(mb) as mb,SUM(md) as md,SUM(mc) as mc,SUM(me) as me from gl_accass where iyear=2019 and ccode = '213105' and iperiod =2 15 select SUM(mb) as mb,SUM(md) as md,SUM(mc) as mc,SUM(me) as me from gl_accass where iyear=2019 and ccode = '213106' and iperiod =2 16 17 -- 多辅助明细账汇总表 18 select * from GL_AccMultiAss where iyear=2019 and ccode = '10020101' and iperiod =2 19 select * from GL_AccMultiAss where iyear=2019 and ccode = '213105' and iperiod =2 20 select * from GL_AccMultiAss where iyear=2019 and ccode = '213106' and iperiod =2 21 22 select SUM(mb) as mb,SUM(md) as md,SUM(mc) as mc,SUM(me) as me from GL_AccMultiAss where iyear=2019 and ccode = '10020101' and iperiod =2 23 select SUM(mb) as mb,SUM(md) as md,SUM(mc) as mc,SUM(me) as me from GL_AccMultiAss where iyear=2019 and ccode = '213105' and iperiod =2 24 select SUM(mb) as mb,SUM(md) as md,SUM(mc) as mc,SUM(me) as me from GL_AccMultiAss where iyear=2019 and ccode = '213106' and iperiod =2
1.首先了解这三个科目的辅助核算设置
10020101没有辅助核算
213105 客户项目 辅助核算
213106 客户项目自定义项
2.记录下测试前原本科目数据
3.填写两条凭证:198和199(业务逻辑可能不正确,只限于验证后台数据),凭证号每月都是从1开始排的。
4.审核之后,gl-accvouch只记录了一下审核人,其他表数据都没有发生改变
4.记账。
标签:U8,SUM,iyear,用友,2019,select,gl,where,13.0 来源: https://www.cnblogs.com/xiaobaidejiucuoben/p/14448772.html