找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

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

[技巧] 财务会计--总账--期末处理--关账

[复制链接]
发表于 2022-1-27 15:11:55 | 显示全部楼层 |阅读模式

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

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

×
--财务会计--总账--期末处理--关账
select distinct org_financeorg.code 财务组织编码,
                org_financeorg.name 财务组织名称,
                bd_accperiod.periodyear 会计年度,
                bd_accperiodmonth.accperiodmth 会计月份,
                substr(bd_accperiodmonth.begindate, 1, 10) 开始日期,
                substr(bd_accperiodmonth.enddate, 1, 10) 结束日期,
                org_closeacc.ispreclose 提前关账,
                org_closeacc.isclose 关账,
                sm_user_a.user_name 关账人,
                substr(org_closeacc.closetime, 1, 10) 关账时间,
                sm_user_b.user_name 反关账人,
                substr(org_closeacc.unclosetime, 1, 10) 反关账时间,
                sm_user_c.user_name 反提前关账人,
                substr(org_closeacc.unpreclosetime, 1, 10) 反提前关账时间,
                org_closeacc.isendacc 结账,
                sm_user_d.user_name 结账人,
                substr(org_closeacc.endacctime, 1, 10) 结账时间,
                sm_user_e.user_name 反结账人,
                substr(org_closeacc.unendacctime, 1, 10) 反结账时间,
                case org_closeacc.moduleid
                  when '2002' then
                   '总账'
                  when '2006' then
                   '应收管理'
                  when '2008' then
                   '应付管理'
                  when '2012' then
                   '固定资产'
                  when '2014' then
                   '存货核算'
                  when '3830' then
                   '产品成本'
                end 结账模块
  from org_closeacc org_closeacc --账簿_组织关账
inner join org_financeorg org_financeorg --组织_业务单元_财务组织
    on org_closeacc.pk_org = org_financeorg.pk_financeorg
--and org_closeacc.closeorgpks = org_financeorg.pk_financeorg
  left join bd_accperiodmonth bd_accperiodmonth --会计月份
    on org_closeacc.pk_accperiodmonth = bd_accperiodmonth.pk_accperiodmonth
  left join bd_accperiod bd_accperiod --会计期间档案
    on bd_accperiodmonth.pk_accperiod = bd_accperiod.pk_accperiod
   and bd_accperiodmonth.pk_org = bd_accperiod.pk_org
  left join sm_user sm_user_a
    on org_closeacc.closeuser = sm_user_a.cuserid
  left join sm_user sm_user_b
    on org_closeacc.unprecloseuser = sm_user_b.cuserid
  left join sm_user sm_user_c
    on org_closeacc.unprecloseuser = sm_user_c.cuserid
  left join sm_user sm_user_d
    on org_closeacc.endaccuser = sm_user_d.cuserid
  left join sm_user sm_user_e
    on org_closeacc.unendaccuser = sm_user_e.cuserid
where nvl(org_closeacc.dr, 0) = 0
   and org_closeacc.moduleid in
       ('2002', '2006', '2008', '2012', '2014', '3830')
--and org_financeorg.code = '108'
--and org_closeacc.isclose = 'Y'
--and org_closeacc.isendacc = 'Y'
order by org_financeorg.code,
          case org_closeacc.moduleid
            when '2002' then
             '总账'
            when '2006' then
             '应收管理'
            when '2008' then
             '应付管理'
            when '2012' then
             '固定资产'
            when '2014' then
             '存货核算'
            when '3830' then
             '产品成本'
          end,
          bd_accperiod.periodyear,
          bd_accperiodmonth.accperiodmth


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

本版积分规则

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

GMT+8, 2024-4-19 18:44 , Processed in 0.039639 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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