✏️ 正在编辑: producao-analitico-body.phtml
路径:
/srv/systems_dir/yuppiecred/application/views/scripts/relatorio/producao-analitico-body.phtml
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php $corretorId = $this->qtd = 0; $valorBrutoTotalGeral = 0; $valorLiquidoTotalGeral = 0; $valorSeguroTotalGeral = 0; $baseComissaoEmpresaTotalGeral = 0; $comissaoEmpresaTotalGeral = 0; $bonusPrevistoEmpresaTotalGeral = 0; $bonusRecebidoEmpresaTotalGeral = 0; $comissaoBonusEmpresaTotalGeral = 0; $baseComissaoCorretorTotalGeral = 0; $comissaoCorretorTotalGeral = 0; $bonusCorretorTotalGeral = 0; $diferencaTotalGeral = 0; if( count($this->producao) > 0 ): foreach ( $this->producao as $key => $producao ): if($producao['corretor_id'] != $corretorId): $this->qtd = 0; $corretorId = $producao['corretor_id']; ?> <tr class="top_list"> <td colspan="36">Corretor: <?php echo $producao['corretor'] . ($producao['corretor_uf'] ? " - UF: " . $producao['corretor_uf'] : ''); ?></td> </tr> <tr class="top_list"> <th>Nº Contrato</th> <th>CPF</th> <th>Cliente</th> <th>Rota</th> <th>Supervisor</th> <th>Banco</th> <th>Convênio</th> <th>Tipo</th> <th>Prazo</th> <th>Tabela</th> <th>Formalização</th> <th>SRCC</th> <th>Status</th> <th>Emissão</th> <th>Liberação</th> <th>Vl. Bruto</th> <th>Vl. Líquido</th> <th>Vl. Seguro</th> <th>Base Com. Emp.</th> <th>Vl. Parcela</th> <th>Com. Emp.(%)</th> <th>Adiantamento(%)</th> <th>Vl. Emp.</th> <th>Bônus Previsto(%)</th> <th>Bônus Previsto(R$)</th> <th>Bônus Recebido(%)</th> <th>Bônus Recebido(R$)</th> <th>Total comissão empresa</th> <th>Comissao Recebida</th> <th>Base Com. Cor.</th> <th>Com. Cor.(%)</th> <th>Com. Cor.(R$)</th> <th>Bônus Cor.(%)</th> <th>Bônus Cor.(R$)</th> <th>Valor Fixo Cor.(R$)</th> <th style="text-align: center">≠</th> </tr> <?php endif; ?> <?php $this->valorBrutoTotal += $producao['valor_bruto']; $this->valorLiquidoTotal += $producao['valor_liquido']; $this->valorSeguroTotal += $producao['valor_seguro']; $this->baseComissaoEmpresaTotal += $producao['base_comissao_empresa_valor']; $this->baseComissaoCorretorTotal += $producao['base_comissao_valor']; $comissaoEmpresa = $producao['valor_fixo_empresa'] + ($producao['base_comissao_empresa_valor'] * $producao['comissao_empresa'] / 100) + ($producao['base_comissao_empresa_adiantamento'] * $producao['adiantamento_comissao_empresa'] / 100); $this->comissaoEmpresaTotal += $comissaoEmpresa; $bonusPrevistoEmpresa = ($producao['base_comissao_empresa_bonus']*$producao['bonus_empresa']/100); $this->bonusPrevistoEmpresaTotal += $bonusPrevistoEmpresa; $bonusRecebidoEmpresa = ($producao['base_comissao_empresa_bonus']*$producao['bonus_recebido']/100); $this->bonusRecebidoEmpresaTotal += $bonusRecebidoEmpresa; $comissaoBonusEmpresa = ($comissaoEmpresa + $bonusRecebidoEmpresa); $this->comissaoBonusEmpresaTotal += $comissaoBonusEmpresa; $bonusCorretor = $producao['base_comissao_bonus'] * $producao['bonus_corretor'] / 100; $this->bonusCorretorTotal += $bonusCorretor; $comissaoCorretor = $producao['valor_fixo_corretor'] + ($producao['base_comissao_valor'] * $producao['comissao_corretor'] / 100); $this->comissaoCorretorTotal += $comissaoCorretor; $diferenca = $comissaoBonusEmpresa - ($comissaoCorretor + $bonusCorretor); $this->diferencaTotal += $diferenca; $this->valorFixoCorretorTotal += $producao['valor_fixo_corretor']; ?> <tr> <td><?php echo $producao['numero_contrato'] ?> <?php echo isset($producao['numero_ade']) && $producao['numero_ade'] > 0 ? " | <br />" . $producao['numero_ade'] : ""; ?></td> <td class="cpf"><?php echo Yuppie_Auth::getIdentity()->grupo == 'Corretor' || Yuppie_Auth::getIdentity()->corretor_id > 0 ? String_Refatorar::ocultarCaracteres($producao['cpf_cliente'], 11) : $producao['cpf_cliente']; ?></td> <td><?php echo $producao['cliente'] ?></td> <td><?php echo $producao['rota'] ?></td> <td><?php echo $producao['supervisor'] ?></td> <td><?php echo $producao['banco'] ?></td> <td><?php echo $producao['convenio'] ?></td> <td><?php echo $producao['tipo'] ?></td> <td><?php echo $producao['prazo'] ?></td> <td><?php echo $producao['tabela'] ?></td> <td><?php echo $producao['tipo_formalizacao'] ? 'Digital' : 'Física' ?></td> <td><?php echo $producao['srcc'] ? "SIM" : "NÃO"; ?></td> <td><?php echo $producao['status_proposta_nome'] ?></td> <td><?php echo $this->dateFormat($producao['data_emissao']) ?></td> <td><?php echo $this->dateFormat($producao['data_liberacao']) ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($producao['valor_bruto'], 2, ',', '.') ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($producao['valor_liquido'], 2, ',', '.') ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($producao['valor_seguro'], 2, ',', '.') ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($producao['base_comissao_empresa_valor'], 2, ',', '.') ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($producao['valor_prestacao'], 2, ',', '.') ?></td> <td class="valor"> <?php echo number_format($producao['comissao_empresa'], 2, ',', '.') ?> %</td> <td class="valor"> <?php echo number_format($producao['adiantamento_comissao_empresa'], 2, ',', '.') ?> %</td> <td class="valor"><span>R$ </span> <?php echo number_format($comissaoEmpresa, 2, ',', '.') ?></td> <td class="valor"> <?php echo number_format($producao['bonus_empresa'], 2, ',', '.') ?> %</td> <td class="valor"><span>R$ </span> <?php echo number_format($bonusPrevistoEmpresa, 2, ',', '.') ?></td> <td class="valor"> <?php echo number_format($producao['bonus_recebido'], 2, ',', '.') ?> %</td> <td class="valor"><span>R$ </span> <?php echo number_format($bonusRecebidoEmpresa, 2, ',', '.') ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($comissaoBonusEmpresa, 2, ',', '.');?></td> <td class="valor"> <?php echo $this->comissaoRecebida($producao['data_recebimento_comissao']); ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($producao['base_comissao_valor'], 2, ',', '.') ?></td> <td class="valor"> <?php echo number_format($producao['comissao_corretor'], 2, ',', '.') ?>%</td> <td class="valor"><span>R$ </span> <?php echo number_format($comissaoCorretor, 2, ',', '.') ?></td> <td class="valor"> <?php echo number_format($producao['bonus_corretor'], 2, ',', '.') ?>%</td> <td class="valor"><span>R$ </span> <?php echo number_format($bonusCorretor, 2, ',', '.') ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($producao['valor_fixo_corretor'], 2, ',', '.') ?></td> <td class="valor"><span>R$ </span> <?php echo number_format($diferenca, 2, ',', '.') ?></td> </tr> <?php $this->qtd++; ?> <?php if (!isset($this->producao[$key+1]) || $this->producao[$key+1]['corretor_id'] != $corretorId): ?> <?php $valorBrutoTotalGeral += $this->valorBrutoTotal; $valorLiquidoTotalGeral += $this->valorLiquidoTotal; $valorSeguroTotalGeral += $this->valorSeguroTotal; $baseComissaoEmpresaTotalGeral += $this->baseComissaoEmpresaTotal; $comissaoEmpresaTotalGeral += $this->comissaoEmpresaTotal; $bonusPrevistoEmpresaTotalGeral += $this->bonusPrevistoEmpresaTotal; $bonusRecebidoEmpresaTotalGeral += $this->bonusRecebidoEmpresaTotal; $comissaoBonusEmpresaTotalGeral += $this->comissaoBonusEmpresaTotal; $baseComissaoCorretorTotalGeral += $this->baseComissaoCorretorTotal; $comissaoCorretorTotalGeral += $this->comissaoCorretorTotal; $bonusCorretorTotalGeral += $this->bonusCorretorTotal; $diferencaTotalGeral += $this->diferencaTotal; $valorFixoCorretorTotalGeral += $this->valorFixoCorretorTotal; ?> <?php echo $this->render("relatorio/producao-analitico-totalizador-corretor.phtml"); ?> <?php endif; ?> <?php endforeach; endif; ?> <tr> <td colspan="15" class="negrito" >Total Geral: <?php echo count($this->producao); ?></td> <td colspan="1" class="valor negrito"><span>R$</span> <?php echo number_format($valorBrutoTotalGeral, 2, ',', '.'); ?></td> <td colspan="1" class="valor negrito"><span>R$</span> <?php echo number_format($valorLiquidoTotalGeral, 2, ',', '.'); ?></td> <td colspan="1" class="valor negrito"><span>R$</span> <?php echo number_format($valorSeguroTotalGeral, 2, ',', '.'); ?></td> <td colspan="1" class="valor negrito"><span>R$</span> <?php echo number_format($baseComissaoEmpresaTotalGeral, 2, ',', '.'); ?></td> <td colspan="4" class="valor negrito"><span>R$</span> <?php echo number_format($comissaoEmpresaTotalGeral, 2, ',', '.'); ?></td> <td colspan="2" class="valor negrito"><span>R$</span> <?php echo number_format($bonusPrevistoEmpresaTotalGeral, 2, ',', '.'); ?></td> <td colspan="2" class="valor negrito"><span>R$</span> <?php echo number_format($bonusRecebidoEmpresaTotalGeral, 2, ',', '.'); ?></td> <td colspan="1" class="valor negrito"><span>R$</span> <?php echo number_format($comissaoBonusEmpresaTotalGeral, 2, ',', '.'); ?></td> <td colspan="2" class="valor negrito"><span>R$</span> <?php echo number_format($baseComissaoCorretorTotalGeral, 2, ',', '.'); ?></td> <td colspan="2" class="valor negrito"><span>R$</span> <?php echo number_format($comissaoCorretorTotalGeral, 2, ',', '.'); ?></td> <td colspan="2" class="valor negrito"><span>R$</span> <?php echo number_format($bonusCorretorTotalGeral, 2, ',', '.'); ?></td> <td colspan="1" class="valor negrito"><span>R$</span> <?php echo number_format($valorFixoCorretorTotalGeral, 2, ',', '.'); ?></td> <td colspan="1" class="valor negrito"><span>R$</span> <?php echo number_format($diferencaTotalGeral, 2, ',', '.'); ?></td> </tr>
💾 保存文件
← 返回文件管理器