× Tabelas
☰ Relatórios(/_Desenvolvimento/Fluxo Simulado)

select y.Data , y.depositado as "Depositado|real|sum", y.investido as "investido|real|sum", e1 as "1|real|sum", e2 as "2|real|sum", e3 as "3|real|sum", e4 as "4|real|sum", e5 as "5|real|sum", e6 as "6|real|sum", e7 as "7|real|sum", e8 as "8|real|sum", e9 as "9|real|sum", e10 as "10|real|sum", e11 as "11|real|sum", e12 as "12|real|sum", e13 as "13|real|sum", e14 as "14|real|sum", e15 as "15|real|sum", e16 as "16|real|sum", e17 as "17|real|sum", e18 as "18|real|sum", e19 as "19|real|sum", e20 as "20|real|sum", e21 as "21|real|sum", e22 as "22|real|sum", e23 as "23|real|sum", e24 as "24|real|sum", e25 as "25|real|sum", e26 as "26|real|sum", y.total_recebido as "Total de Pagamentos|real", @saldo as "saldo_anterior|real", (@saldo := (@saldo + coalesce(y.depositado,0) - coalesce(y.investido,0) + coalesce(y.total_recebido,0))) as "saldo|real" from ( select x.Data, (select SUM(lan_valor) from nex_conta_lancamento where lan_tipo = 'deposito' and lan_data between x.Data and LAST_DAY(x.Data)) as depositado, (select sum(emp_valor) from nex_empresa where emp_data between x.Data and LAST_DAY(x.Data)) as investido, SUM(case when x.emp_codigo = 1 then x.valor else 0 end) as e1, SUM(case when x.emp_codigo = 2 then x.valor else 0 end) as e2, SUM(case when x.emp_codigo = 3 then x.valor else 0 end) as e3, SUM(case when x.emp_codigo = 4 then x.valor else 0 end) as e4, SUM(case when x.emp_codigo = 5 then x.valor else 0 end) as e5, SUM(case when x.emp_codigo = 6 then x.valor else 0 end) as e6, SUM(case when x.emp_codigo = 7 then x.valor else 0 end) as e7, SUM(case when x.emp_codigo = 8 then x.valor else 0 end) as e8, SUM(case when x.emp_codigo = 9 then x.valor else 0 end) as e9, SUM(case when x.emp_codigo = 10 then x.valor else 0 end) as e10, SUM(case when x.emp_codigo = 11 then x.valor else 0 end) as e11, SUM(case when x.emp_codigo = 12 then x.valor else 0 end) as e12, SUM(case when x.emp_codigo = 13 then x.valor else 0 end) as e13, SUM(case when x.emp_codigo = 14 then x.valor else 0 end) as e14, SUM(case when x.emp_codigo = 15 then x.valor else 0 end) as e15, SUM(case when x.emp_codigo = 16 then x.valor else 0 end) as e16, SUM(case when x.emp_codigo = 17 then x.valor else 0 end) as e17, SUM(case when x.emp_codigo = 18 then x.valor else 0 end) as e18, SUM(case when x.emp_codigo = 19 then x.valor else 0 end) as e19, SUM(case when x.emp_codigo = 20 then x.valor else 0 end) as e20, SUM(case when x.emp_codigo = 21 then x.valor else 0 end) as e21, SUM(case when x.emp_codigo = 22 then x.valor else 0 end) as e22, SUM(case when x.emp_codigo = 23 then x.valor else 0 end) as e23, SUM(case when x.emp_codigo = 24 then x.valor else 0 end) as e24, SUM(case when x.emp_codigo = 25 then x.valor else 0 end) as e25, SUM(case when x.emp_codigo = 26 then x.valor else 0 end) as e26, SUM(coalesce(x.valor,0)) total_recebido from ( select m.data, e.emp_codigo, round(case when par_data_pagto is null then par_valor else par_valor_pagto end,2) as valor from meses m left join nex_parcelas p on DATE_FORMAT((case WHEN p.par_data_pagto is null then p.par_data else p.par_data_pagto end),"%Y") = DATE_FORMAT(m.data,"%Y") and DATE_FORMAT((case WHEN p.par_data_pagto is null then p.par_data else p.par_data_pagto end),"%m") = DATE_FORMAT(m.data,"%m") left join nex_empresa e on e.emp_codigo = p.emp_codigo where m.data >= (select DATE_SUB(LAST_DAY(min(l.lan_data)),INTERVAL DAY(LAST_DAY(min(l.lan_data)))-1 DAY) from nex_conta_lancamento l) ) x group by x.data ) y JOIN (SELECT @saldo := 0) r order by y.data
Fatal error: Uncaught Error: Call to undefined function getDataReport() in /home/freeside/financas/relatorios/v1/report.php:204 Stack trace: #0 /home/freeside/financas/relatorios/v1/index.php(235): include() #1 {main} thrown in /home/freeside/financas/relatorios/v1/report.php on line 204