D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreListarEstoqueAcolhimento.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GrsListarEstoqueAcolhimento * * @copyright (c) year, Carlos Marques - CM */ class GreListarEstoqueAcolhimento { private $PageId; private $DadosForm; public function listEstAcolh($PageId = null) { $this->DadosForm = filter_input_array(INPUT_GET, FILTER_DEFAULT); $this->PageId = (int) $PageId; //var_dump( $this->DadosForm ); $listarEstAcolh = new \App\adms\Models\helper\AdmsRead(); $listarEstAcolh->fullRead("Select est.gre_produto_id prod_cod, prod.nome, mask(lpad(resid.cpf,11,0), '###.###.###-##') cpfm, resid.nome resid_nome, est.gre_residente_id resid_id, est.unid_adm, est.qtde_apres, est.qtde, TRUNCATE((est.qtde / est.qtde_apres), 0) qtde_emb_fechada, apres.sigla, d.nome nome_depto FROM gre_estoque_residente est join gre_produto prod on prod.id = est.gre_produto_id join gre_prod_departamento d on d.id = prod.gre_departamento_id join gre_prod_apres apres on prod.gre_apres_id = apres.id join gre_residente resid on resid.id = est.gre_residente_id where est.gre_residente_id and est.gre_residente_id = :resid_id order by prod.nome", "resid_id={$this->DadosForm['id']}"); $this->Resultado = $listarEstAcolh->getResultado(); return $this->Resultado; } }