电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

查询未指定现金流量的凭证

来源:金蝶云社区作者:金蝶2024-09-1614

查询未指定现金流量的凭证

select b.fdate,b.fnumber,sum(a.凭证余额) as 凭证余额,sum(a.流量表余额) as 流量表余额,sum(a.凭证余额)-sum(a.流量表余额)  as 余额


from 

(select a.fvoucherid  ,(case when a.a=0  then a.余额  else 0 end ) as 凭证余额,(case when a.a=1  then a.余额  else 0 end ) as 流量表余额


from 

(select  a.fvoucherid,sum(增加现金流)-sum(减少现金流) as 余额,0 as a from 

(select  a.fvoucherid, (case when a.a=0  then a.famount  else 0  end ) as 增加现金流,

(case when a.a=1  then a.famount  else 0  end ) as 减少现金流

from 


(select  fvoucherid,famount,0 as a from  t_voucherentry where  faccountid  in 

(select  faccountid  from  t_account  where   (fiscash=1 or fisbank=1  or  fiscashflow=1))

and fdc=1

 union  all


select  fvoucherid,famount,1  from  t_voucherentry where  faccountid  in 

(select  faccountid  from  t_account  where   (fiscash=1 or fisbank=1  or  fiscashflow=1))

and fdc=0) a ) a

group by a.fvoucherid



union all


select a.fvoucherid,  sum(a.现金量流入)-sum(a.现金量流出) as 现金流量余额,1 from 


(select a.fvoucherid,(case  when a.a=0  then a.famount  else  0  end ) 现金量流入,

(case  when a.a=1  then a.famount  else 

查询未指定现金流量的凭证

select b.fdate,b.fnumber,sum(a.凭证余额) as 凭证余额,sum(a.流量表余额) as 流量表余额,sum(a.凭证余额)-sum(a.流量表余额) as ...
点击下载文档文档为doc格式

声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

已经是第一篇
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信