D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Views
/
Cotacao
/
Filename :
VieCtPedidoProdutoListar.php
back
Copy
<?php // VIEW - Listar Filials if (!defined('URL')) { header("Location: /"); exit(); } ?> <div class="content p-1"> <div class="list-group-item"> <div class="d-flex"> <div class="mr-auto p-2"> <?php if($this->Dados['listProdutos'][0]['nome_repres'] == '') { ?> <h2 class="display-4 titulo"><font color="red">Produtos NÃO COTADOS</font></h2> <?php }else{ ?> <h2 class="display-4 titulo">Produtos do Pedido</h2> <?php } ?> </div> <?php if ($this->Dados['botao']['vol_pedido']) { ?> <a href="<?php echo URLADM . 'con-ct-pedido-fechar/listar?opcao=V&data='. $this->Dados['listProdutos'][0]['data_cotacao']; ?>"> <div class="p-2"> <button class="btn btn-outline-success btn-sm"> Voltar </button> </div> </a> <?php } ?> <?php if ($this->Dados['botao']['exc_pedido']) { ?> <a href="<?php echo URLADM . 'con-ct-pedido-fechar/listar?opcao=E&data='. $this->Dados['listProdutos'][0]['data_cotacao'].'&repres_id='. $this->Dados['listProdutos'][0]['repres_id'].'&forn_id='. $this->Dados['listProdutos'][0]['forn_id']; ?>"> <div class="p-2"> <button class="btn btn-outline-primary btn-sm"> Gerar Excel </button> </div> </a> <?php } ?> </div> <?php if (empty($this->Dados['listProdutos'])) { ?> <div class="alert alert-danger" role="alert"> Nenhum Produto encontrado! <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <?php } if (isset($_SESSION['msg'])) { echo $_SESSION['msg']; unset($_SESSION['msg']); } ?> <font size="2"> <?php if($this->Dados['listProdutos'][0]['nome_repres'] <> '') { ?> <div class="form-row"> <label><?php echo '<b>Cotação: '. $this->Dados['listProdutos'][0]['cotacao_id'].'/'.$this->Dados['listProdutos'][0]['sugestao_id'].'</b>'?></label> </div> <?php if($this->Dados['listProdutos'][0]['nome_tipo_resposta'] <> '' and $this->Dados['listProdutos'][0]['valor_difei'] > 0){ ?> <div class="form-row"> <label><?php echo 'Negociação: <b>'. $this->Dados['listProdutos'][0]['nome_tipo_resposta'].'</b> Valor da Diferença: <b>'.$this->Dados['listProdutos'][0]['valor_dife'].'</b>'?></label> </div> <?php } ?> <?php if($this->Dados['listProdutos'][0]['nome_tipo_resposta'] <> '' and $this->Dados['listProdutos'][0]['valor_difei'] < 00.01){ ?> <div class="form-row"> <label><?php echo 'Negociação: <b>'. $this->Dados['listProdutos'][0]['nome_tipo_resposta']?></label> </div> <?php } ?> <?php } ?> <div class="form-row"> <div class="col-md"> <table id="example-crm" class="datatable-idoso-gre stripe " cellspacing="0" width="100%"> <thead> <tr> <th class="d-none d-lg-table-cell">Marca</th> <th class="d-none d-lg-table-cell">Produto</th> <th class="d-none d-lg-table-cell">EAN</th> <th class="d-none d-lg-table-cell">Curva</th> <th class="d-none d-lg-table-cell">Qtde</th> <th class="d-none d-lg-table-cell">Preço Desejado</th> <?php if($this->Dados['listProdutos'][0]['nome_repres'] <> '') { ?> <th class="d-none d-lg-table-cell">Menor Preço</th> <th class="d-none d-lg-table-cell">Preço Resposta</th> <?php } ?> </tr> </thead> <tbody> <?php // echo '<pre>'; // var_dump($this->Dados['dadosProduto']); // echo '</pre>'; foreach ($this->Dados['listProdutos'] as $filial) { extract($filial); ?> <tr> <td><?php echo $marca_nome; ?></td> <td><?php echo $prod_cod.' - '.$prod_nome; ?></td> <td><?php echo $ean ?></td> <td align="center"><?php echo $curva; ?></td> <td align="center"><?php echo $qtde; ?></td> <td align="center"><?php echo $tenho_preco_m; ?></td> <?php if($this->Dados['listProdutos'][0]['nome_repres'] <> '') { ?> <td align="center"><?php echo $menor_preco_m; ?></td> <?php if($preco_respostai < $menor_preco) { ?> <td align="center"><font color="blue"><b><?php echo $preco_resposta; ?></b></font></td> <?php }else{ ?> <td align="center"><?php echo $preco_resposta; ?></td> <?php } ?> <?php } ?> </tr> <?php } ?> </tbody> </table> </div> </div> </font> </div> </div>