| Server IP : 54.233.248.239 / Your IP : 172.28.1.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/vinumday2_0/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Planos Financeiros
<small>PPR</small>
</h1>
<ol class="breadcrumb">
<li><a href="<?php echo e(url('admin')); ?>"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li><a href="<?php echo e(url('admin/plano-financeiro')); ?>"> Planos Financeiros</a></li>
<li class="active">PPR</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header no-print">
<form id="form-fluxo-caixa" method="POST" action="<?php echo url('admin/plano-financeiro/ppr'); ?>">
<div class="row">
<div class="col-md-2">
<h5>% Distr. Grupo C/B:</h5>
<input id="perc_distribuicao_grupo" type="number" class="form-control" value="<?php echo e(number_format($perc_distribuicao_grupo, 0, '.', ',')); ?>" name="perc_distribuicao_grupo" />
</div>
<div class="col-md-2">
<h5>% PPR Colaboradores:</h5>
<input id="perc_ppr_colaboradores" type="text" class="form-control" value="<?php echo e(number_format($perc_ppr_colaboradores, 0, '.', ',')); ?>" name="perc_ppr_colaboradores" />
</div>
<div class="col-md-2">
<h5>% Distr. Copyright C/I:</h5>
<input id="perc_distribuicao_copyright_ci" type="number" class="form-control" value="<?php echo e(number_format($perc_distribuicao_copyright_ci, 0, '.', ',')); ?>" name="perc_distribuicao_copyright_ci" />
</div>
<div class="col-md-2">
<h5>% Distr. Grupo C/I:</h5>
<input id="perc_distribuicao_grupo_ci" type="number" class="form-control" value="<?php echo e(number_format($perc_distribuicao_grupo_ci, 0, '.', ',')); ?>" name="perc_distribuicao_grupo_ci" />
</div>
<div class="col-md-2">
<h5>% Distr. Reinvestimento C/I:</h5>
<input id="perc_distribuicao_reinvestimento_ci" type="number" class="form-control" value="<?php echo e(number_format($perc_distribuicao_reinvestimento_ci, 0, '.', ',')); ?>" name="perc_distribuicao_reinvestimento_ci" />
</div>
</div>
<div class="row">
<div class="col-md-2">
<h5>% Fat. Custos Variáveis:</h5>
<input id="fator_custo_variavel" type="number" class="form-control" value="<?php echo e(number_format($fator_custo_variavel, 2, '.', ',')); ?>" name="fator_custo_variavel" />
</div>
<div class="col-md-2">
<h5>Custo por garrafa R$:</h5>
<input id="custo_garrafa" type="number" class="form-control" value="<?php echo e(number_format($custo_garrafa, 2, '.', ',')); ?>" name="custo_garrafa" />
</div>
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<h5>Período:</h5>
<select id="mes_inicial" required class="form-control" name="mes_inicial">
<?php
foreach($months as $month):
$selected = (isset($mes_inicial) && $mes_inicial == $month['ano'].'-'.str_pad($month['mes'], 2, "0", STR_PAD_LEFT) ? 'selected="selected"' : '');
?>
<option value="<?php echo $month['ano'].'-'.str_pad($month['mes'], 2, "0", STR_PAD_LEFT);?>" <?php echo $selected; ?>>
<?php echo strftime("%B / %Y", strtotime( $month['ano']."-{$month['mes']}" ))?>
</option>
<?php endforeach;?>
</select>
</div>
</div>
</div>
<div class="col-md-2">
<h5>Gravar Lançamentos PPR:</h5>
<input id="gravar_lancamento" type="checkbox" value="1" <?php echo ($gravar_lancamento == 1) ? 'checked' : ''; ?> name="gravar_lancamento" />
</div>
<div class="col-md-2">
<div class="row">
<div class="col-md-12">
<button type="button" id="btn-gerar-fluxo" class="btn btn-block btn-primary" style="margin-top:35px;">Gerar</button>
</div>
</div>
</div>
</div>
</form>
</div>
<!-- /.box-header -->
<div class="box-body">
<?php if(isset($vendas_core_business)): ?>
<div class="form-group"></div>
<div class="row">
<div style="overflow: auto;">
<table class="table table-bordered" style="width: 800px;">
<thead>
<tr>
<th class="text-center bg-primary" colspan="4">CORE BUSINESS</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="4"><strong>FATURAMENTO</strong></td>
</tr>
<tr>
<td style="width: 275px">SEGMENTO</td>
<td class="text-right" style="width: 175px">VALOR</td>
<td class="text-right" style="width: 175px">MARGEM</td>
<td class="text-right" style="width: 175px;">QTDE. GARRAFAS</td>
</tr>
<?php $__currentLoopData = $vendas_core_business; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($tipo_ofertas[$item->tipo]); ?></td>
<td class="text-right">R$ <?php echo e(number_format($item->total_oferta, 2, ',', '.')); ?></td>
<td class="text-right">R$ <?php echo e(number_format($item->margem, 2, ',', '.')); ?></td>
<td class="text-right"><?php echo e(number_format($item->qtde_garrafas, 0, '', '')); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><strong>TOTAL</strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_ofertas_business, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_margem_business, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong><?php echo e(number_format($total_garrafas_business, 0, '', '')); ?></strong></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td>CONTA REINVESTIMENTO (ACUM)</td>
<td class="text-right">R$ <?php echo e(number_format($conta_reinvestimento, 2, ',', '.')); ?></td>
<td colspan="2"></td>
</tr>
<tr>
<td>CUSTOS ESPORÁDICOS MÊS</td>
<td class="text-right" style="color: red">R$ <?php echo e(number_format($custo_esporadico, 2, ',', '.')); ?></td>
<td colspan="2"></td>
</tr>
<tr>
<td><strong>ESPORÁDICO EFETIVO MÊS</strong></td>
<td class="text-right" <?php echo ($esporadico_efetivo_mes < 0 ? 'style="color: red"' : ''); ?>>
<strong>R$ <?php echo e(number_format($esporadico_efetivo_mes, 2, ',', '.')); ?></strong>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4"><strong>CUSTOS</strong></td>
</tr>
<tr>
<td>SEGMENTO</td>
<td class="text-right">VALOR</td>
<td colspan="2"></td>
</tr>
<tr>
<td>FIXOS</td>
<td class="text-right" style="color: red">R$ <?php echo e(number_format($custo_fixo, 2, ',', '.')); ?></td>
<td colspan="2"></td>
</tr>
<tr>
<td>VARIÁVEIS</td>
<td class="text-right" style="color: red">R$ <?php echo e(number_format($custo_variavel_business, 2, ',', '.')); ?></td>
<td colspan="2"></td>
</tr>
<tr>
<td>CUPONS DE DESCONTO</td>
<td class="text-right" style="color: red">R$ <?php echo e(number_format($cupom_desconto, 2, ',', '.')); ?></td>
<td colspan="2"></td>
</tr>
<tr>
<td>PPR COLABORADORES</td>
<td class="text-right" style="color: red">R$ <?php echo e(number_format($ppr_colaboradores, 2, ',', '.')); ?></td>
<td colspan="2"></td>
</tr>
<?php if($esporadico_efetivo_mes < 0): ?>
<tr>
<td>CUSTOS ESPORÁDICOS MÊS</td>
<td class="text-right" style="color: red">R$ <?php echo e(number_format($custo_esporadico, 2, ',', '.')); ?></td>
<td colspan="2"></td>
</tr>
<?php endif; ?>
<tr>
<td><strong>TOTAL</strong></td>
<td class="text-right" style="color: red"><strong>R$ <?php echo e(number_format($total_core_business, 2, ',', '.')); ?></strong></td>
<td colspan="2"></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4"><strong>MARGEM LÍQUIDA</strong></td>
</tr>
<tr>
<td>TOTAL</td>
<td class="text-right">
R$ <?php echo e(number_format($margem_liquida, 2, ',', '.')); ?>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>DISTRIBUIÇÃO GRUPO</td>
<td class="text-right" style="color: red">
R$ <?php echo e(number_format($distribuicao_grupo_business, 2, ',', '.')); ?>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td><strong>SALDO REINVESTIMENTO</strong></td>
<td class="text-right">
<strong>R$ <?php echo e(number_format($saldo_reinvestimento, 2, ',', '.')); ?></strong>
</td>
<td colspan="2"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="form-group"></div>
<div class="row">
<div style="overflow: auto;">
<table class="table table-bordered" style="width: 100%;">
<thead>
<tr>
<th class="text-center bg-primary" colspan="4">CAMPANHAS</th>
<th class="text-center" colspan="3"></th>
<th class="text-center" colspan="3">DISTRIBUIÇÃO</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 200px">CAMPANHA | RESPONSÁVEL</td>
<td class="text-right" style="width: 200px">FATURAMENTO</td>
<td class="text-right" style="width: 200px">MARGEM BRUTA</td>
<td class="text-right" style="width: 200px">QTDE. GARRAFAS</td>
<td class="text-right" style="width: 10%">CUSTO VARIÁVEL</td>
<td class="text-right" style="width: 10%">OUTROS CUSTOS</td>
<td class="text-right" style="width: 10%">MARGEM LÍQUIDA</td>
<td class="text-right" style="width: 10%">COPYRIGHT</td>
<td class="text-right" style="width: 10%">GRUPO</td>
<td class="text-right" style="width: 10%">REINVESTIMENTO</td>
</tr>
<?php $__currentLoopData = $vendas_campanhas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr data-id="<?php echo e($item->id); ?>" id="canal-<?php echo e($item->id); ?>">
<td>
<?php if($item->slug == 'acessorios'): ?>
<i class="fa-detail ver-detalhes-canal fa fa-plus-circle"></i>
<?php endif; ?>
<?php echo e($item->nome); ?> <?php echo e($item->subtitulo); ?><?php echo (!empty($item->responsavel) ? " | " . substr($item->responsavel, 0, 1) : "")?>
</td>
<td class="text-right">R$ <?php echo e(number_format($item->total_oferta, 2, ',', '.')); ?></td>
<td class="text-right">R$ <?php echo e(number_format($item->margem, 2, ',', '.')); ?></td>
<td class="text-right"><?php echo e(number_format($item->qtde_garrafas, 0, '', '')); ?></td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->custo_variavel_campanha, 2, ',', '.')); ?>
</td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->total_custo, 2, ',', '.')); ?>
</td>
<td class="text-right <?php echo ($item->margem_liquida < 0 ? 'color-red' : '')?>">
R$ <?php echo e(number_format($item->margem_liquida, 2, ',', '.')); ?>
</td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->distribuicao_copyright_campanhas, 2, ',', '.')); ?>
</td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->distribuicao_grupo_campanhas, 2, ',', '.')); ?>
</td>
<td class="text-right">
R$ <?php echo e(number_format($item->distribuicao_reinvestimento_campanhas, 2, ',', '.')); ?>
</td>
</tr>
<?php if($item->slug == 'acessorios'): ?>
<tr id="detalhes-canal-<?php echo e($item->id); ?>" style="background-color: #F2F2F2; display: none">
<td colspan="10" style="padding: 0px;">
<div class="row">
<div class="col-md-12">
<table class="table table-bordered" style="margin: 0px;" cellpadding="0" cellspacing="0" border="0">
<tbody>
<?php $__currentLoopData = $item->ofertas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $oferta): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td style="width: 199px; font-size: 12px;"><?php echo e($oferta->titulo); ?> <?php echo e($oferta->sub_titulo); ?><?php echo (!empty($oferta->responsavel) ? " | " . substr($oferta->responsavel, 0, 1) : "")?></td>
<td class="text-right" style="width: 200px">R$ <?php echo e(number_format($oferta->total_oferta, 2, ',', '.')); ?></td>
<td class="text-right" style="width: 200px">R$ <?php echo e(number_format($oferta->margem, 2, ',', '.')); ?></td>
<td class="text-right" style="width: 200px"><?php echo e(number_format($oferta->qtde_garrafas, 0, '', '')); ?></td>
<td class="text-right color-red" style="width: 10%">
R$ <?php echo e(number_format($oferta->custo_variavel_oferta, 2, ',', '.')); ?>
</td>
<td class="text-right color-red" style="width: 10%">
R$ 0,00
</td>
<td class="text-right" style="width: 10%">
R$ <?php echo e(number_format($oferta->margem_liquida, 2, ',', '.')); ?>
</td>
<td class="text-right color-red" style="width: 10%">
R$ <?php echo e(number_format($oferta->distribuicao_copyright_ofertas, 2, ',', '.')); ?>
</td>
<td class="text-right color-red" style="width: 10%">
R$ <?php echo e(number_format($oferta->distribuicao_grupo_ofertas, 2, ',', '.')); ?>
</td>
<td class="text-right" style="width: 10%">
R$ <?php echo e(number_format($oferta->distribuicao_reinvestimento_ofertas, 2, ',', '.')); ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</td>
</tr>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><strong>TOTAL</strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_ofertas_campanhas, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_margem_campanhas, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong><?php echo e(number_format($total_garrafas_campanhas, 0, '', '')); ?></strong></td>
<td class="text-right color-red"><strong>R$ <?php echo e(number_format($total_custo_variavel_campanhas, 2, ',', '.')); ?></strong></td>
<td class="text-right color-red"><strong>R$ <?php echo e(number_format($total_outros_custos_campanhas, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_margem_liquida_campanhas, 2, ',', '.')); ?></strong></td>
<td class="text-right color-red"><strong>R$ <?php echo e(number_format($total_distribuicao_copyright_campanhas, 2, ',', '.')); ?></strong></td>
<td class="text-right color-red"><strong>R$ <?php echo e(number_format($total_distribuicao_grupo_campanhas, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_distribuicao_reinvestimento_campanhas, 2, ',', '.')); ?></strong></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="form-group"></div>
<div class="row">
<div style="overflow: auto;">
<table class="table table-bordered" style="width: 100%;">
<thead>
<tr>
<th class="text-center bg-primary" colspan="4">INOVAÇÃO</th>
<th class="text-center" colspan="3"></th>
<th class="text-center" colspan="3">DISTRIBUIÇÃO</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 200px">CAMPANHA | RESPONSÁVEL</td>
<td class="text-right" style="width: 200px">FATURAMENTO</td>
<td class="text-right" style="width: 200px">MARGEM BRUTA</td>
<td class="text-right" style="width: 200px">QTDE. GARRAFAS</td>
<td class="text-right">CUSTO VARIÁVEL</td>
<td class="text-right">OUTROS CUSTOS</td>
<td class="text-right">MARGEM LÍQUIDA</td>
<td class="text-right">COPYRIGHT</td>
<td class="text-right">GRUPO</td>
<td class="text-right">REINVESTIMENTO</td>
</tr>
<?php $__currentLoopData = $vendas_inovacao_canal; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($item->nome); ?> <?php echo e($item->subtitulo); ?><?php echo (!empty($item->responsavel) ? " | " . substr($item->responsavel, 0, 1) : "")?></td>
<td class="text-right">R$ <?php echo e(number_format($item->total_oferta, 2, ',', '.')); ?></td>
<td class="text-right">R$ <?php echo e(number_format($item->margem, 2, ',', '.')); ?></td>
<td class="text-right"><?php echo e(number_format($item->qtde_garrafas, 0, '', '')); ?></td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->custo_variavel_inovacao, 2, ',', '.')); ?>
</td>
<td class="text-right color-red"></td>
<td class="text-right">
R$ <?php echo e(number_format($item->margem_liquida, 2, ',', '.')); ?>
</td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->distribuicao_copyright_inovacao, 2, ',', '.')); ?>
</td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->distribuicao_grupo_inovacao, 2, ',', '.')); ?>
</td>
<td class="text-right">
R$ <?php echo e(number_format($item->distribuicao_reinvestimento_inovacao, 2, ',', '.')); ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php $__currentLoopData = $vendas_inovacao; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($tipo_ofertas[$item->tipo]); ?><?php echo (!empty($item->responsavel) ? " | " . substr($item->responsavel, 0, 1) : "")?></td>
<td class="text-right">R$ <?php echo e(number_format($item->total_oferta, 2, ',', '.')); ?></td>
<td class="text-right">R$ <?php echo e(number_format($item->margem, 2, ',', '.')); ?></td>
<td class="text-right"><?php echo e(number_format($item->qtde_garrafas, 0, '', '')); ?></td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->custo_variavel_inovacao, 2, ',', '.')); ?>
</td>
<td class="text-right color-red"></td>
<td class="text-right">
R$ <?php echo e(number_format($item->margem_liquida, 2, ',', '.')); ?>
</td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->distribuicao_copyright_inovacao, 2, ',', '.')); ?>
</td>
<td class="text-right color-red">
R$ <?php echo e(number_format($item->distribuicao_grupo_inovacao, 2, ',', '.')); ?>
</td>
<td class="text-right">
R$ <?php echo e(number_format($item->distribuicao_reinvestimento_inovacao, 2, ',', '.')); ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><strong>TOTAL</strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_ofertas_inovacao, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_margem_inovacao, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong><?php echo e(number_format($total_garrafas_inovacao, 0, '', '')); ?></strong></td>
<td class="text-right color-red"><strong>R$ <?php echo e(number_format($total_custo_variavel_inovacao, 2, ',', '.')); ?></strong></td>
<td class="text-right color-red"><strong></strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_margem_liquida_inovacao, 2, ',', '.')); ?></strong></td>
<td class="text-right color-red"><strong>R$ <?php echo e(number_format($total_distribuicao_copyright_inovacao, 2, ',', '.')); ?></strong></td>
<td class="text-right color-red"><strong>R$ <?php echo e(number_format($total_distribuicao_grupo_inovacao, 2, ',', '.')); ?></strong></td>
<td class="text-right"><strong>R$ <?php echo e(number_format($total_distribuicao_reinvestimento_inovacao, 2, ',', '.')); ?></strong></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="form-group"></div>
<div class="row">
<div style="overflow: auto;">
<table class="table table-bordered" style="width: 800px;">
<thead>
<tr>
<th class="text-center bg-primary" colspan="4">TOTAIS</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width: 275px">FATURAMENTO</td>
<td class="text-right" style="width: 175px">
R$ <?php echo e(number_format($total_faturamento, 2, ',', '.')); ?>
</td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<tr>
<td style="width: 275px">MARGEM BRUTA</td>
<td class="text-right" style="width: 175px">
R$ <?php echo e(number_format($total_margem, 2, ',', '.')); ?>
</td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<tr>
<td style="width: 275px">CUSTOS FIXOS</td>
<td class="text-right color-red" style="width: 175px">R$ <?php echo e(number_format($custo_fixo, 2, ',', '.')); ?></td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<tr>
<td style="width: 275px">CUSTOS VARIÁVEIS</td>
<td class="text-right color-red" style="width: 175px">
R$ <?php echo e(number_format($total_custo_variavel, 2, ',', '.')); ?>
</td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<tr>
<td style="width: 275px">CUPONS DE DESCONTO</td>
<td class="text-right color-red" style="width: 175px">R$ <?php echo e(number_format($cupom_desconto, 2, ',', '.')); ?></td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<tr>
<td style="width: 275px">PPR COLABORADORES</td>
<td class="text-right color-red" style="width: 175px">R$ <?php echo e(number_format($ppr_colaboradores, 2, ',', '.')); ?></td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<?php if($esporadico_efetivo_mes < 0): ?>
<tr>
<td style="width: 275px">CUSTOS ESPORÁDICOS MÊS</td>
<td class="text-right color-red" style="width: 175px">R$ <?php echo e(number_format($custo_esporadico, 2, ',', '.')); ?></td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<?php endif; ?>
<tr>
<td style="width: 275px">DISTRIBUIÇÃO GRUPO</td>
<td class="text-right color-red" style="width: 175px">
R$ <?php echo e(number_format($total_distribuicao_grupo, 2, ',', '.')); ?>
</td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<tr>
<td style="width: 275px">DISTRIBUIÇÃO COPYRIGHT</td>
<td class="text-right color-red" style="width: 175px">
R$ <?php echo e(number_format($total_distribuicao_copyright, 2, ',', '.')); ?>
</td>
<td class="text-right" colspan="2" style="width: 350px;"></td>
</tr>
<tr>
<td><strong>SALDO REINVESTIMENTO</strong></td>
<td class="text-right">
<strong>R$ <?php echo e(number_format($saldo_final, 2, ',', '.')); ?></strong>
</td>
<td class="text-right" colspan="2"></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php endif; ?>
</div>
<!-- /.box-body -->
<div class="box-footer">
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<div id="modal-evento" class="modal fade">
<form method="/" id="formEvento" type="POST">
<div class="modal-dialog" style="width: 75%">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 id="time-label"></h4>
</div>
<div class="modal-body" id="conteudo-modal-evento"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(document).on('click', '.ver-detalhes-canal', function(){
var icon = $(this);
var tr = icon.closest('tr');
var id_canal = tr.data('id');
$(this).removeClass('ver-detalhes-canal');
$(this).addClass('esconder-detalhes-canal');
$(this).addClass('fa-minus-circle');
$(this).removeClass('fa-plus-circle');
$('#detalhes-canal-' + id_canal).show();
});
$(document).on('click', '.esconder-detalhes-canal', function(){
var icon = $(this);
var tr = icon.closest('tr');
var id_canal = tr.data('id');
$(this).removeClass('esconder-detalhes-canal');
$(this).addClass('ver-detalhes-canal');
$(this).addClass('fa-plus-circle');
$(this).removeClass('fa-minus-circle');
$('#detalhes-canal-' + id_canal).hide();
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('.select2').select2();
$(document).on('click', '.ver-detalhes-conta', function(){
var icon = $(this);
var tr = icon.closest('tr');
var tipo = icon.data('tipo');
$.ajax({
url:'/admin/plano-financeiro/filtrar-lancamentos-ppr',
type:'POST',
data:{
receita_despesa : tipo,
periodicidade : $('#periodicidade').val(),
ano_inicial : $('#ano_inicial').val(),
ano_final : $('#ano_final').val(),
mes_inicial : $('#mes_inicial').val(),
mes_final : $('#mes_final').val(),
empresa_id : $('#empresa_id').val(),
id_plano_financeiro : $('#id_plano_financeiro').val(),
},
success:function(data){
if(data.status){
tr.after(data.html);
icon.removeClass('fa-plus-circle');
icon.removeClass('ver-detalhes-conta');
icon.addClass('esconder-detalhes-conta');
icon.addClass('fa-minus-circle');
}else{
alertUtil.alertError(data.message);
}
}
});
});
$(document).on('click', '.esconder-detalhes-conta', function(){
var next = $(this).closest('tr').next();
while(next.hasClass('detalhes-conta')){
var aux = next.next();
next.remove();
next = aux;
}
$(this).removeClass('esconder-detalhes-conta');
$(this).addClass('ver-detalhes-conta');
$(this).addClass('fa-plus-circle');
$(this).removeClass('fa-minus-circle');
});
$('#btn-gerar-fluxo').click(function(){
var plano_financeiro = $('#id_plano_financeiro').val();
if(plano_financeiro == ''){
alertUtil.alertWarning('Plano Financeiro não informado!');
}else{
$('#form-fluxo-caixa').submit();
}
});
$('#periodicidade').change(function(){
var visualizacao = $(this).val();
console.log(visualizacao);
if(visualizacao == 'M'){
$('#ano_inicial, #ano_final').addClass('hidden');
$('#mes_inicial, #mes_final').removeClass('hidden');
}else{
$('#mes_inicial, #mes_final').addClass('hidden');
$('#ano_inicial, #ano_final').removeClass('hidden');
}
});
<?php if(isset($id_plano_financeiro)): ?>
var content = $('.content-header').width();
var table_fluxo = $('#table-fluxo-caixa').width();
console.log(content);
console.log(table_fluxo);
if(table_fluxo > content){
$('#row-table-fluxo').css('width', content - parseInt(100) + 'px');
}
<?php endif; ?>
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make($current_template, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>