D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Models
/
Cotacao
/
Filename :
ModCtCotadoVerMarca.php
back
Copy
<?php namespace App\gre\Models\Cotacao; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of ModFilialVer { * * @copyright (c) year, Carlos Marques - CM */ class ModCtCotadoVerMarca { private $Resultado; private $DadosId; public function verMarcaCotado($DadosId) { $this->DadosId = $DadosId; $verCota = new \App\adms\Models\helper\AdmsRead(); $verCota->fullRead("select c.data, date_format(c.data, '%d/%m/%Y') data_m, c.marca_id, c.forn_id, max(f.nome_fantasia) nome_forn, max(m.nome) nome_marca, c.repres_id repres_id, max(r.apelido) nome_repres, c.status_id status_id, max(sit.nome) nome_sit, case when max(fm.ol) = 'S' then 'SIM' else ' ' END ol, case when max(fm.negocia_marca) = 'S' then 'SIM' else ' ' END negocia_marca, max(cr.cor) cor_cr from ct_cotacao c inner join ro_marca m on m.id = c.marca_id inner join ct_fornecedor_marca fm on fm.forn_id = c.forn_id and fm.marca_id = c.marca_id left join adms_usuarios r on r.id = c.repres_id left join ct_fornecedor f on f.forn_id = c.forn_id INNER JOIN ct_status sit ON sit.id= c.status_id INNER JOIN adms_cors cr ON cr.id= sit.cor_id where data = :data group by c.data, c.marca_id, c.forn_id, c.repres_id, c.status_id order by c.marca_id, c.forn_id, c.repres_id ", "data=".$this->DadosId['data']); $this->Resultado = $verCota->getResultado(); //var_dump($this->Resultado); return $this->Resultado; } }