D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreLerMovimentoCpCr.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of GreLerMovimentoCpCr * * @copyright (c) year, Carlos Marques - CM */ class GreLerMovimentoCpCr { private $Resultado; private $Dados; public function lerLanc($DadosId = null) { $this->Dados = $DadosId; $lerLanc = new \App\adms\Models\helper\AdmsRead(); $lerLanc->fullRead("SELECT mov.id, conta.nome conta_nome, mov.nome_titular, tipo.nome tipo_nome, mov.docto, mov.gre_cp_cr_tipo_id, mov.gre_empr_princ_id, mov.gre_filial_id, filial.nome_fantasia filial_nome, DATE_FORMAT(mov.data_emissao,'%d/%m/%Y') emissao, DATE_FORMAT(mov.data_vencimento,'%d/%m/%Y') vencimento, FORMAT(mov.valor, 2, 'de_DE') valor, mov.valor valor_fatura FROM gre_cp_cr mov join gre_filial filial on filial.id = mov.gre_filial_id join gre_cp_cr_tipo_conta tipo on tipo.id = mov.gre_cp_cr_tipo_id join gre_cp_cr_conta conta on conta.gre_tipo_id = mov.gre_cp_cr_tipo_id and conta.id = mov.gre_cp_cr_conta_id WHERE mov.gre_status_fat_id = 1 and mov.data_vencimento >= :datai and mov.data_vencimento <= :dataf and mov.gre_cp_cr_tipo_id = :tipo and mov.gre_empr_princ_id = :empr_princ_id and mov.gre_filial_id = :gre_filial_id order by mov.data_vencimento", "datai={$this->Dados['datai']}&dataf={$this->Dados['dataf']}&tipo={$this->Dados['tipo']}&empr_princ_id={$this->Dados['gre_empr_princ_id']}&gre_filial_id={$this->Dados['gre_filial_id']}"); $this->Resultado= $lerLanc->getResultado(); return $this->Resultado; } }