D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Models
/
Cotacao
/
Filename :
ModCtCotadoVerRepresMarca.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 ModCtCotadoVerRepresMarca { 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, max(c.forn_id) forn_id, max(f.nome_fantasia) nome_forn, c.marca_id, max(m.nome) nome_marca, c.repres_id repres_id, r.apelido nome_repres, 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(c.status_id) status_id, max(sit.nome) nome_sit, max(cr.cor) cor_cr from ct_cotacao c inner join ct_fornecedor f on f.forn_id = c.forn_id 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 inner join adms_usuarios r on r.id = c.repres_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 and c.forn_id = :forn_id and c.repres_id = :repres_id group by c.data, c.marca_id,c.repres_id,r.apelido order by m.nome", "data=".$this->DadosId['data']."&forn_id=".$this->DadosId['forn_id']."&repres_id=".$this->DadosId['repres_id']); $this->Resultado = $verCota->getResultado(); //var_dump($this->Resultado); return $this->Resultado; } }