D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreVerItemFatura.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GreVerItemFatura * * @copyright (c) year, Carlos Marques */ class GreVerItemFatura { private $Resultado; private $DadosId; private $Dados; public function verItemFat($Dados = null) { $this->Dados = filter_input_array(INPUT_GET, FILTER_DEFAULT); $this->DadosId = $this->Dados['id'] ; $verItemFatura = new \App\adms\Models\helper\AdmsRead(); $verItemFatura->fullRead("SELECT fat.*, forma.nome forma_nome, filial.nome_fantasia filial_nome, resid.nome resid_nome, gfat.nome gfat_nome, cabfat.gre_status_fat_id cabfat_gre_status_fat_id, DATE_FORMAT(STR_TO_DATE( cabfat.vencimento, '%Y-%m-%d'), '%d/%m/%Y') vencimento, fat.docto id_fat, :filial_id filial_sel, :tipo tipo_sel FROM gre_cab_fatura cabfat join gre_fatura fat on fat.docto = cabfat.docto join gre_forma_pagamento forma on forma.id = cabfat.gre_forma_pagto_id join gre_filial filial on filial.id = fat.gre_filial_id join gre_residente resid on resid.id = fat.gre_residente_id join gre_grupo_fatura gfat on gfat.id = fat.gre_grupo_fatura WHERE cabfat.docto = :id order by gre_grupo_fatura, fat.prod_nome, fat.descricao", "id=".$this->DadosId."&filial_id=".$this->Dados['filial_id']."&tipo=".$this->Dados['tipo']); $this->Resultado= $verItemFatura->getResultado(); return $this->Resultado; } }