D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
rosario
/
adm
/
app
/
gre
/
Views
/
Trade
/
Filename :
VieTradeRepasseListar.php
back
Copy
<?php if (!defined('URL')) { header("Location: /"); exit(); } //var_dump($this->Dados['select']); ?> <div class="content p-1"> <div class="list-group-item"> <div class="d-flex"> <div class="mr-auto p-2"> <h2 class="display-4 titulo">TRADE - Listar Repasse</h2> </div> <?php //var_dump($this->Dados['botao']); if ($this->Dados['botao']['vol_repas']) { ?> <a href="<?php echo URLADM . 'con-trade-repasse/listar'; ?>"> <div class="p-2"> <button class="btn btn-outline-primary btn-sm"> Voltar </button> </div> </a> <?php } ?> </div> <?php if (empty($this->Dados['select'])) { ?> <div class="alert alert-danger" role="alert"> Nenhum Repasse 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']); } $total_repasse = 0; $total_meta = 0; $total_compra_vinculada = 0; $total_compra_total = 0; if (!empty($this->Dados['select'])){ ?> <h3 align="center"><b><font color="blue"><?php echo $this->Dados['select'][0]['marca_nome']?></font></b></h3> <hr> <div class="table-responsive"> <font size="2"> <table id="example-crm" class="datatable-idoso-gre stripe " cellspacing="0" width="100%"> <thead> <tr> <th>Mes/Ano</th> <th>Base do Repasse</th> <td align="right" ><b>Meta</b></td>> <td align="right" ><b>Compra Total</b></td> <td align="right" ><b>Compra Vinculada</b></td> <td align="right" ><b>% Meta</b></td> <td align="right" ><b>% Verba</b></td> <td align="right" ><b>Valor da Verba</b></td> </tr> </thead> <tbody> <?php foreach ($this->Dados['select'] as $meta) { extract($meta); ?> <tr> <td><?php echo $mesano;?></td> <td><?php echo $tipo_nome;?></td> <td align="right"><?php echo number_format($valor_meta,2,',','.');?></td> <td align="right"><?php echo number_format($valor_compra_total,2,',','.');?></td> <td align="right"><?php echo number_format($valor_compra_vinculada,2,',','.');?></td> <td align="right"><?php echo number_format($perc_atingido,2,',','.').'%';?></td> <td align="right"><?php echo number_format($percentual,2,',','.').'%';?></td> <td align="right"><?php echo number_format($valor_repasse,2,',','.');?></td> <?php $total_repasse += $valor_repasse; $total_meta += $valor_meta; $total_compra_vinculada += $valor_compra_vinculada; $total_compra_total += $valor_compra_total; } ?> </tr> </tbody> <tfoot> <?php $total_atingido = round(($total_compra_vinculada / $total_meta)*100, 1); if($total_compra_vinculada > 0 ){ $perc_verba = round(($total_repasse / $total_compra_vinculada)*100, 2); }else{ $perc_verba = 0; } ?> <td class="table-info" align="left"><b><font color="blue">Totais no</b></td> <td class="table-info" align="left"><b><font color="blue">Periodo</b></td> <td align="right" class="table-info"><b><font color="blue"><?php echo number_format($total_meta ,2,',','.') ?></b></td> <td align="right" class="table-info"><b><font color="blue"><?php echo number_format($total_compra_total ,2,',','.') ?></b></td> <td align="right" class="table-info"><b><font color="blue"><?php echo number_format($total_compra_vinculada ,2,',','.') ?></b></td> <td align="right" class="table-info"><b><font color="blue"><?php echo number_format($total_atingido ,1,',','.').'%' ?></b></td> <td align="right" class="table-info"><b><font color="blue"><?php echo number_format($perc_verba ,2,',','.').'%' ?></b></td> <td align="right" class="table-info"><b><font color="blue"><?php echo number_format($total_repasse ,2,',','.') ?></b></td> <td class="table-info"></td> </tfoot> </table> </font> </div> </div> </div> <?php } ?>