• 制单表查询all终于搞定了辅助核算显示


    感谢赵泉提出的gl_freevalue表中的辅助项
    select gl_detail.explanation,
           bd_accsubj.dispname,
           gl_detail.debitamount 借方,
           gl_detail.creditamount 贷方,
           gl_detail.prepareddatev 制单日期,
           gl_voucher.no 凭证号,
            wmsys.wm_concat(bd_bdinfo.bdname)辅助名,
           wmsys.wm_concat(gl_freevalue.valuecode) valuecode,
           wmsys.wm_concat(gl_freevalue.valuename) valuename,
           gl_detail.pk_systemv,
           gl_detail.detailindex
      from bd_accsubj
      join gl_detail
        on gl_detail.pk_accsubj = bd_accsubj.pk_accsubj
      join bd_glorgbook
        on bd_glorgbook.pk_glorgbook = bd_accsubj.pk_glorgbook
      join gl_voucher
        on gl_detail.pk_voucher = gl_voucher.pk_voucher
      left join gl_freevalue
        on gl_detail.assid = gl_freevalue.freevalueid
      left join  bd_bdinfo
        on gl_freevalue.checktype=bd_bdinfo.pk_bdinfo
     where gl_detail.dr = '0'
       and gl_detail.yearv >= '2010'
       and bd_glorgbook.glorgbookcode = '010201-0001'
       and gl_detail.explanation<>'期初'
      /* and gl_detail.explanation='付财大凤凰楼项目人工费(洪荣森)'*/
    --and bd_accsubj.subjcode like '150103%'
     group by gl_detail.explanation,
              bd_accsubj.dispname,
              gl_detail.creditamount,
              gl_detail.debitamount,
              gl_detail.prepareddatev,
              gl_voucher.no,
              gl_detail.pk_systemv,
              gl_detail.detailindex
     order by gl_detail.prepareddatev, gl_voucher.no
    
    

    效果图:

     
  • 相关阅读:
    SpringBoot发送邮箱验证码
    判断一个数是否为2的整数次幂
    [模板] 虚树 && bzoj2286-[Sdoi2011]消耗战
    [模板] K-D Tree
    [模板] 平衡树: Splay, 非旋Treap, 替罪羊树
    对于约数个数上界的估计
    luogu3702-[SDOI2017]序列计数
    [模板] 线性基
    [模板] 区间mex && 区间元素种数
    bzoj4367-[IOI2014]holiday假期
  • 原文地址:https://www.cnblogs.com/sumsen/p/2519968.html
Copyright © 2020-2023  润新知