D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreListarCliniEstLancDia.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GreListarResidListEstLanc * * @copyright (c) year, Carlos Marques - CM */ class GreListarCliniEstLancDia { private $Resultado; private $PageId; public function listCliniEstLanc( $Dados = null) { $this->Dados = filter_input_array(INPUT_GET, FILTER_DEFAULT); $listCliniListEstLanc = new \App\adms\Models\helper\AdmsRead(); $listCliniListEstLanc->fullRead("SELECT mov.id id, mov.lanca_duplo lanca_duplo, mov.data, DATE_FORMAT(mov.data,'%d/%m/%y %H:%i') data_m, mov.descricao, case when mov.mov_fin = 'D' then 'S' else mov.mov_fin end mov_fin, grup.nome grup_nome, mov.gre_produto_id, prod.nome prod_nome, f.nome_fantasia filial_nome, mov.gre_filial_id, FORMAT(mov.qtde, 0, 'de_DE') qtde, FORMAT(mov.valor_total, 2, 'de_DE') valor_total, mov.gre_status_id, sit.nome nome_sit, cr.cor cor_cr, usu.usuario FROM gre_est_mov_clinica mov join gre_est_grupo_lancamento grup on grup.id = mov.gre_grupo_lancamento_id and grup.gre_origem_id = 1 inner join gre_filial f on f.id = mov.gre_filial_id join adms_usuarios usu on usu.id = mov.gre_usuario_id join gre_produto prod on mov.gre_produto_id = prod.id INNER JOIN gre_status sit ON sit.id= mov.gre_status_id INNER JOIN adms_cors cr ON cr.id=sit.adms_cor_id WHERE mov.gre_filial_id = :filial_id and mov.gre_status_id in (1,9) and mov.mov_fin not in ('A','S','D') and DATE_FORMAT(mov.data,'%Y-%m')= DATE_FORMAT(curdate(),'%Y-%m') order by mov.data DESC", "&filial_id={$this->Dados['filial_id']}"); $this->Resultado = $listCliniListEstLanc->getResultado(); // var_dump($this->Resultado[0]); return $this->Resultado; } }