D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreListarResidEstLancDia.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GreListarResidListEstLanc * * @copyright (c) year, Carlos Marques - CM */ class GreListarResidEstLancDia { private $Resultado; private $PageId; public function listResidEstLanc( $Dados = null) { $this->Dados = filter_input_array(INPUT_GET, FILTER_DEFAULT); $listResidListEstLanc = new \App\adms\Models\helper\AdmsRead(); $listResidListEstLanc->fullRead("SELECT mov.id id, resid.id resid_id, resid.nome resid_nome, resid.gre_filial_id filial_id, mov.lanca_duplo lanca_duplo, mov.fornecimento, 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, 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_residente mov join gre_residente resid on resid.id = mov.gre_residente_id 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_empr_princ_id = :empr_id and mov.gre_residente_id = :resid_id and mov.gre_status_id in (1,9) and mov.lanca_duplo <> 'A' and DATE_FORMAT(mov.data,'%Y-%m-%d') > f.data_ult_fechamento order by mov.data DESC", "resid_id={$this->Dados['resid_id']}&empr_id={$_SESSION['id_user']}"); $this->Resultado = $listResidListEstLanc->getResultado(); //var_dump($this->Resultado[0]); return $this->Resultado; } }