Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
21 kB
3
Indexable
Never
<table class="table sales-table" cellspacing="5" cellpadding="5">

                <thead>

                <tr>
                    <td colspan="9" height="20"></td>
                </tr>
                <tr class="title">
                    <th colspan="9" class="text-center">DEMONSTRATIVO DE DESPESAS</th>
                </tr>

                <?
                $total = $totalGeral;
                $contUser = 0;

                if (count($this->userTax) > 0) {

                $totalLiquido = 0;
                $totalDespesas = 0;

                foreach ($this->userTax as $name => $dataProd) {

                    $contUser++;

                    $dataProd = $dataProd[0][$this->dtPadrao];

                    ?>
                    <tr>
                        <th colspan="9" class="btn-primary btn-lg">
                            <?= $name ?>
                        </th>
                    </tr>
                    <tr>
                        <th class="text-center">TIPO DE DESPESA</th>
                        <th class="text-center" colspan="2" align="center">ONLINE</th>
                        <th class="text-center" colspan="2" align="center">PDV</th>
                        <th class="text-center" colspan="2" align="center">TEATRO</th>
                        <th class="text-center" colspan="2" align="center">TOTAL GERAL</th>
                    </tr>
                    <tr>
                        <td class="div"></td>
                        <td class="text-center"><strong>BASE</strong></td>
                        <td class="text-center div"><strong>VALOR</strong></td>
                        <td class="text-center"><strong>BASE</strong></td>
                        <td class="text-center div"><strong>VALOR</strong></td>
                        <td class="text-center"><strong>BASE</strong></td>
                        <td class="text-center div"><strong>VALOR</strong></td>
                        <td class="text-center" colspan="2"><strong>VALOR</strong></td>
                    </tr>

                    <tr>
                        <td class="bold div">TAXA CARTÃO DE CRÉDITO / DÉBITO</td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["baseTaxaCartao"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaCartaoOnline, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["baseTaxaCartaoPDV"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaCartaoPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["baseTaxaCartaoTeatro"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaCartaoTeatro, 2, ",", ".") ?>
                        </td>

                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->taxaCartao, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>

                        <td class="bold div">TAXA VENDAS DINHEIRO</td>
                        <td class="bold text-center">
                            <?php echo number_format(0, 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format(0, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["baseTaxaDinheiroPDV"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaDinheiroPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["baseTaxaDinheiroTeatro"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaDinheiroTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->taxaDinheiro, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>
                        <td class="bold div">TAXA SERVIÇO PERCENTUAL</td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["percentualTaxaServicoProdutor"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoPercentualOnline, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["percentualTaxaServicoProdutorPDV"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoPercentualPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            <?php echo number_format($dataProd["percentualTaxaServicoProdutorTeatro"], 2, ",", ".") ?>%
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoPercentualTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoPercentualOnline + $this->DescontoBordero->taxaServicoPercentualPDV + $this->DescontoBordero->taxaServicoPercentualTeatro, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>
                        <td class="bold div">TAXA SERVIÇO FIXA</td>
                        <td class="bold text-center">
                            R$ <?php echo number_format($dataProd["valorTaxaServicoProdutor"], 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoFixaOnline, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            R$ <?php echo number_format($dataProd["valorTaxaServicoProdutorPDV"], 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoFixaPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            R$ <?php echo number_format($dataProd["valorTaxaServicoProdutorTeatro"], 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoFixaTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->taxaServicoFixaOnline + $this->DescontoBordero->taxaServicoFixaPDV + $this->DescontoBordero->taxaServicoFixaTeatro, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>
                        <td class="bold div">TAXA LOCAÇÃO</td>
                        <td class="bold text-center">
                            R$ <?php echo number_format(0, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format(0, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            R$ <?php echo number_format(0, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaLocacaoPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            R$ <?php echo number_format(0, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->taxaLocacaoTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->taxaLocacao, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>

                        <td class="bold div">IMPRESSÃO DE INGRESSOS</td>
                        <td class="bold text-center">
                            R$ <?php echo number_format($dataProd["valorImpressaoUni"], 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->totalImpressaoOnline, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            R$ <?php echo number_format($dataProd["valorImpressaoUniPDV"], 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->totalImpressaoPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">
                            R$ <?php echo number_format($dataProd["valorImpressaoUniTeatro"], 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->totalImpressaoTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->totalImpressao, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>
                        <td class="bold div">TAXA SISTEMA</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">R$ 0,00</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->custoPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->custoPDV, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->custoPDV, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>
                        <td class="bold div">VOUCHER</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">R$ 0,00</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->RelatorioVendas->valorTotalVoucherPdv, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->RelatorioVendas->valorTotalVoucherTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->voucher, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>
                        <td class="bold div">TOTAL VENDIDO EM DINHEIRO</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">R$ 0,00</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->RelatorioVendas->valorTotalDinheiroPdv, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->RelatorioVendas->valorTotalDinheiroTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->RelatorioVendas->valorTotalDinheiroPdv + $this->RelatorioVendas->valorTotalDinheiroTeatro, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <tr>
                        <td class="bold div">CARTÃO DE DÉBITO/CRÉDITO DO PDV/TEATRO</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">R$ 0,00</td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->cartaoPDV, 2, ",", ".") ?>
                        </td>
                        <td class="bold text-center">R$ 0,00</td>
                        <td class="bold text-center div">
                            R$ <?php echo number_format($this->DescontoBordero->cartaoTeatro, 2, ",", ".") ?>
                        </td>
                        <td colspan="2" class="bold text-center">
                            R$ <?php echo number_format($this->DescontoBordero->cartaoPDV + $this->DescontoBordero->cartaoTeatro, 2, ",", ".") ?>
                        </td>
                    </tr>


                    <tr>
                        <td class="bold ">ANÚNCIOS</td>
                        <td class="bold text-center" colspan="2">
                            R$ <?php echo number_format($this->DescontoBordero->valorAnuncios, 2, ",", ".") ?>
                        </td>
                        <td colspan="4"></td>
                        <td class="bold text-center" colspan="2">
                            R$ <?php echo number_format($this->DescontoBordero->valorAnuncios, 2, ",", ".") ?>
                        </td>
                    </tr>

                    <? if ($this->DescontoBordero->valorEmprestimo > 0) { ?>
                        <tr>
                            <td class="bold">ADIANTAMENTOS / EMPRESTIMOS</td>
                            <td class="bold text-center" colspan="2">
                                R$ <?php echo number_format($this->DescontoBordero->valorEmprestimo, 2, ",", ".") ?>
                            </td>
                            <td colspan="2"></td>
                            <td colspan="2" class="bold text-center">
                                R$ <?php echo number_format($this->DescontoBordero->valorEmprestimo, 2, ",", ".") ?>
                            </td>
                        </tr>

                        <? if ($this->DescontoBordero->valorJuros > 0) { ?>

                            <tr>
                                <td class="bold">JUROS DE EMPRESTIMOS</td>
                                <td class="bold text-center" colspan="2">
                                    <?php echo number_format($this->DescontoBordero->valorJuros, 2, ",", ".") ?>%
                                </td>
                                <td colspan="2"></td>

                                <td colspan="2" class="bold text-center">
                                    R$ <?php echo number_format($this->DescontoBordero->valorJuros, 2, ",", ".") ?>
                                </td>

                            </tr>
                            <?
                        }

                        $dtIniEmp = $dataProd["dtInicioEmprestimo"];

                        if ($dtIniEmp != "0000-00-00" && $dtIniEmp != "") {
                            ?>
                            <!--<tr>
                                <th scope="row">- Início do Empréstimo:</th>
                                <td><?php echo date('d/m/Y', strtotime($dtIniEmp)) ?></td>
                            </tr>-->
                            <?
                        }

                        $dtFimEmp = $dataProd["dtFimEmprestimo"];
                        if ($dtFimEmp != "0000-00-00" && $dtFimEmp != "") {
                            ?>
                            <!--<tr>
                                <th scope="row">- Fim do Empréstimo:</th>
                                <td><?php echo date('d/m/Y', strtotime($dtFimEmp)) ?></td>
                            </tr>-->
                            <?
                        }

                    }

                    if ($this->DescontoBordero->valorOutros > 0) {
                        ?>
                        <tr>
                            <td class="bold ">OUTROS</td>
                            <td class="bold text-center" colspan="2">
                                R$ <?php echo number_format($this->DescontoBordero->valorOutros, 2, ",", ".") ?>
                            </td>
                            <td colspan="4"></td>

                            <td colspan="2" class="bold text-center">
                                R$ <?php echo number_format($this->DescontoBordero->valorOutros, 2, ",", ".") ?>
                            </td>

                        </tr>

                        <?
                    }

                    if ($this->DescontoBordero->taxaServico > 0) {
                        ?>
                        <tr>
                            <td class="bold ">TAXA DE SERVIÇO DO SITE</td>
                            <td class="bold text-center" colspan="2">
                                R$ <?php echo number_format($this->DescontoBordero->taxaServico, 2, ",", ".") ?>
                            </td>
                            <td colspan="4"></td>

                            <td colspan="2" class="bold text-center">
                                R$ <?php echo number_format($this->DescontoBordero->taxaServico, 2, ",", ".") ?>
                            </td>

                        </tr>

                        <?
                    }
                    $totalDespesas = $this->DescontoBordero->valorDescontos > $totalDespesas ? ($this->DescontoBordero->valorDescontos) : $totalDespesas;
                    ?>
                    <tr class="total">

                        <td colspan="7"></td>

                        <td class="bold text-center" colspan="2">
                            <strong>R$ <?php echo number_format($this->DescontoBordero->valorDescontos - $this->DescontoBordero->custoTeatro, 2, ",", ".") ?></strong>
                        </td>
                    </tr>
                    <?

                }
                $totalDespesas = $totalDespesas - $this->DescontoBordero->custoTeatro;
                $totalLiquido = ($total - $totalDespesas);

                ?>

                </tbody>

            </table>