D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreLerCabFaturaTotal.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GreLerFatura * * @copyright (c) year, Carlos Marques - CM */ class GreLerCabFaturaTotal { private $Resultado; private $Dados; public function lerFatT() { $this->Dados = filter_input_array(INPUT_GET, FILTER_DEFAULT); $lerFat = new \App\adms\Models\helper\AdmsRead(); // $lerFat->fullRead("SELECT cabfat.id gre_cab_fat_id, cabfat.docto, contr.nome nome_titular, cabfat.anomes data_emissao, date_format(cabfat.vencimento, '%Y-%m-%d') data_vencimento , cabfat.valor_fatura valor, cabfat.valor_juros_dia valor_juros_dia, cabfat.valor_multa valor_multa, 1 gre_cp_cr_tipo_id, 1 gre_cp_cr_conta_id, 1 gre_cp_cr_sub_conta_id, 'Real' tipo_lancamento, cabfat.gre_empr_princ_id gre_empr_princ_id, cabfat.gre_filial_id gre_filial_id, resid.gre_contratante_id gre_contratante_id, cabfat.gre_residente_id gre_residente_id, 1 gre_status_fat_id FROM gre_cab_fatura cabfat join gre_forma_pagamento forma on forma.id = cabfat.gre_forma_pagto_id join gre_filial filial on filial.id = cabfat.gre_filial_id join gre_residente resid on resid.id = cabfat.gre_residente_id join gre_contratante contr on contr.id = resid.gre_contratante_id INNER JOIN gre_status_fat stat ON stat.id= cabfat.gre_status_fat_id INNER JOIN adms_cors cr ON cr.id=stat.adms_cor_id WHERE cabfat.gre_empr_princ_id = :id_user and cabfat.gre_filial_id = :filial_id and cabfat.gre_status_fat_id in (4) and cabfat.docto > 0", "id_user={$_SESSION['id_user']}&filial_id={$this->Dados['filial_id']}"); $this->Resultado= $lerFat->getResultado(); return $this->Resultado; } }