1065 lines
63 KiB
PHP
Executable File
1065 lines
63 KiB
PHP
Executable File
<?php
|
|
|
|
use Twig\Environment;
|
|
use Twig\Error\LoaderError;
|
|
use Twig\Error\RuntimeError;
|
|
use Twig\Extension\CoreExtension;
|
|
use Twig\Extension\SandboxExtension;
|
|
use Twig\Markup;
|
|
use Twig\Sandbox\SecurityError;
|
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
|
use Twig\Source;
|
|
use Twig\Template;
|
|
use Twig\TemplateWrapper;
|
|
|
|
/* @fluxocaixapro/admin/index.twig */
|
|
class __TwigTemplate_5e7d4d10fab14ff00296494459986427 extends Template
|
|
{
|
|
private Source $source;
|
|
/**
|
|
* @var array<string, Template>
|
|
*/
|
|
private array $macros = [];
|
|
|
|
public function __construct(Environment $env)
|
|
{
|
|
parent::__construct($env);
|
|
|
|
$this->source = $this->getSourceContext();
|
|
|
|
$this->blocks = [
|
|
'title' => [$this, 'block_title'],
|
|
'head' => [$this, 'block_head'],
|
|
'content' => [$this, 'block_content'],
|
|
'scripts' => [$this, 'block_scripts'],
|
|
];
|
|
}
|
|
|
|
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
|
|
{
|
|
// line 1
|
|
return "layouts/dashboard.twig";
|
|
}
|
|
|
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
$this->parent = $this->load("layouts/dashboard.twig", 1);
|
|
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
|
|
}
|
|
|
|
// line 3
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_title(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
|
yield " - ";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["platformName"] ?? null), "html", null, true);
|
|
yield from [];
|
|
}
|
|
|
|
// line 5
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_head(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
// line 6
|
|
yield "<!-- Chart.js -->
|
|
<script src=\"https://cdn.jsdelivr.net/npm/chart.js\"></script>
|
|
<style>
|
|
.card-metric { transition: transform 0.2s; cursor: pointer; }
|
|
.card-metric:hover { transform: translateY(-5px); }
|
|
.border-income { border-left: 5px solid #198754 !important; }
|
|
.border-expense { border-left: 5px solid #dc3545 !important; }
|
|
.border-balance { border-left: 5px solid #0dcaf0 !important; }
|
|
</style>
|
|
";
|
|
yield from [];
|
|
}
|
|
|
|
// line 17
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_content(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
// line 18
|
|
yield "<div class=\"container-fluid px-4\">
|
|
<div class=\"d-flex justify-content-between align-items-center mb-4\">
|
|
<h1 class=\"mt-4\">";
|
|
// line 20
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
|
|
yield "</h1>
|
|
<div class=\"d-flex gap-2\">
|
|
<button type=\"button\" class=\"btn btn-outline-primary\" data-bs-toggle=\"modal\" data-bs-target=\"#reconcileModal\">
|
|
<i class=\"bi bi-bank me-1\"></i> Conciliação
|
|
</button>
|
|
<a href=\"";
|
|
// line 25
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa/export"), "html", null, true);
|
|
yield "\" class=\"btn btn-outline-success\">
|
|
<i class=\"bi bi-file-earmark-excel me-1\"></i> Exportar
|
|
</a>
|
|
<button type=\"button\" class=\"btn btn-success\" data-bs-toggle=\"modal\" data-bs-target=\"#newTransactionModal\">
|
|
<i class=\"bi bi-plus-circle me-1\"></i> Nova Transação
|
|
</button>
|
|
<form action=\"";
|
|
// line 31
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa/analysis"), "html", null, true);
|
|
yield "\" method=\"POST\">
|
|
<button type=\"submit\" class=\"btn btn-info text-white\">
|
|
<i class=\"bi bi-cpu me-1\"></i> Análise IA
|
|
</button>
|
|
</form>
|
|
<a href=\"";
|
|
// line 36
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa/categories"), "html", null, true);
|
|
yield "\" class=\"btn btn-secondary\">
|
|
<i class=\"bi bi-tags me-1\"></i> Categorias
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
";
|
|
// line 42
|
|
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["flash_messages"] ?? null), "success", [], "any", false, false, false, 42)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 43
|
|
yield " <div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">
|
|
";
|
|
// line 44
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["flash_messages"] ?? null), "success", [], "any", false, false, false, 44), "html", null, true);
|
|
yield "
|
|
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
|
|
</div>
|
|
";
|
|
}
|
|
// line 48
|
|
yield "
|
|
<!-- Filtros de Período e Status -->
|
|
<div class=\"card mb-4 shadow-sm border-0\">
|
|
<div class=\"card-body\">
|
|
<form method=\"GET\" class=\"row g-3 align-items-end\">
|
|
<div class=\"col-md-3\">
|
|
<label class=\"form-label small fw-bold\">Período:</label>
|
|
<div class=\"input-group input-group-sm\">
|
|
<input type=\"date\" name=\"start_date\" class=\"form-control\" value=\"";
|
|
// line 56
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["startDate"] ?? null), "html", null, true);
|
|
yield "\">
|
|
<span class=\"input-group-text\">até</span>
|
|
<input type=\"date\" name=\"end_date\" class=\"form-control\" value=\"";
|
|
// line 58
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["endDate"] ?? null), "html", null, true);
|
|
yield "\">
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-2\">
|
|
<label class=\"form-label small fw-bold\">Status:</label>
|
|
<select name=\"status\" class=\"form-select form-select-sm\">
|
|
<option value=\"\">Todos</option>
|
|
<option value=\"paid\" ";
|
|
// line 65
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "status", [], "any", false, false, false, 65) == "paid")) ? ("selected") : (""));
|
|
yield ">Pago</option>
|
|
<option value=\"pending\" ";
|
|
// line 66
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "status", [], "any", false, false, false, 66) == "pending")) ? ("selected") : (""));
|
|
yield ">Pendente</option>
|
|
</select>
|
|
</div>
|
|
<div class=\"col-md-2\">
|
|
<label class=\"form-label small fw-bold\">Tipo:</label>
|
|
<select name=\"type\" class=\"form-select form-select-sm\">
|
|
<option value=\"\">Todos</option>
|
|
<option value=\"income\" ";
|
|
// line 73
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "type", [], "any", false, false, false, 73) == "income")) ? ("selected") : (""));
|
|
yield ">Entrada</option>
|
|
<option value=\"expense\" ";
|
|
// line 74
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "type", [], "any", false, false, false, 74) == "expense")) ? ("selected") : (""));
|
|
yield ">Saída</option>
|
|
</select>
|
|
</div>
|
|
<div class=\"col-md-2\">
|
|
<label class=\"form-label small fw-bold\">Entidade:</label>
|
|
<select name=\"entity\" class=\"form-select form-select-sm\">
|
|
<option value=\"\">Todos</option>
|
|
<option value=\"business\" ";
|
|
// line 81
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "entity", [], "any", false, false, false, 81) == "business")) ? ("selected") : (""));
|
|
yield ">Empresa</option>
|
|
<option value=\"personal\" ";
|
|
// line 82
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["filters"] ?? null), "entity", [], "any", false, false, false, 82) == "personal")) ? ("selected") : (""));
|
|
yield ">Pessoal</option>
|
|
</select>
|
|
</div>
|
|
<div class=\"col-md-3\">
|
|
<div class=\"d-flex gap-2\">
|
|
<button type=\"submit\" class=\"btn btn-primary btn-sm flex-grow-1\">
|
|
<i class=\"bi bi-filter me-1\"></i> Filtrar
|
|
</button>
|
|
<a href=\"";
|
|
// line 90
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa"), "html", null, true);
|
|
yield "\" class=\"btn btn-outline-secondary btn-sm\">
|
|
<i class=\"bi bi-x-circle\"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Cards de Métricas Principais -->
|
|
<div class=\"row mb-4\">
|
|
<div class=\"col-xl-3 col-md-6\">
|
|
<div class=\"card card-metric shadow-sm border-0 border-income h-100 py-2\">
|
|
<div class=\"card-body\">
|
|
<div class=\"row no-gutters align-items-center\">
|
|
<div class=\"col mr-2\">
|
|
<div class=\"text-xs font-weight-bold text-success text-uppercase mb-1\">Receitas (Operacional)</div>
|
|
<div class=\"h5 mb-0 font-weight-bold text-gray-800\">R\$ ";
|
|
// line 107
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "operational_income", [], "any", false, false, false, 107), 2, ",", "."), "html", null, true);
|
|
yield "</div>
|
|
<small class=\"text-muted\">Total: R\$ ";
|
|
// line 108
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "total_income", [], "any", false, false, false, 108), 2, ",", "."), "html", null, true);
|
|
yield "</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"col-xl-3 col-md-6\">
|
|
<div class=\"card card-metric shadow-sm border-0 border-expense h-100 py-2\">
|
|
<div class=\"card-body\">
|
|
<div class=\"row no-gutters align-items-center\">
|
|
<div class=\"col mr-2\">
|
|
<div class=\"text-xs font-weight-bold text-danger text-uppercase mb-1\">Despesas (Operacional)</div>
|
|
<div class=\"h5 mb-0 font-weight-bold text-gray-800\">R\$ ";
|
|
// line 120
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "operational_expense", [], "any", false, false, false, 120), 2, ",", "."), "html", null, true);
|
|
yield "</div>
|
|
<small class=\"text-muted\">Total: R\$ ";
|
|
// line 121
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "total_expense", [], "any", false, false, false, 121), 2, ",", "."), "html", null, true);
|
|
yield "</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"col-xl-3 col-md-6\">
|
|
<div class=\"card card-metric shadow-sm border-0 border-info h-100 py-2\">
|
|
<div class=\"card-body\">
|
|
<div class=\"row no-gutters align-items-center\">
|
|
<div class=\"col mr-2\">
|
|
<div class=\"text-xs font-weight-bold text-info text-uppercase mb-1\">Saldo Operacional</div>
|
|
<div class=\"h5 mb-0 font-weight-bold ";
|
|
// line 133
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "operational_balance", [], "any", false, false, false, 133) >= 0)) ? ("text-info") : ("text-danger"));
|
|
yield "\">
|
|
R\$ ";
|
|
// line 134
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "operational_balance", [], "any", false, false, false, 134), 2, ",", "."), "html", null, true);
|
|
yield "
|
|
</div>
|
|
<small class=\"text-muted\">Líquido: R\$ ";
|
|
// line 136
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "net_balance", [], "any", false, false, false, 136), 2, ",", "."), "html", null, true);
|
|
yield "</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"col-xl-3 col-md-6\">
|
|
<div class=\"card card-metric shadow-sm border-0 border-warning h-100 py-2\">
|
|
<div class=\"card-body\">
|
|
<div class=\"row no-gutters align-items-center\">
|
|
<div class=\"col mr-2\">
|
|
<div class=\"text-xs font-weight-bold text-warning text-uppercase mb-1\">Contas Pendentes</div>
|
|
<div class=\"small\">A Receber: <span class=\"text-success fw-bold\">R\$ ";
|
|
// line 148
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "pending_income", [], "any", false, false, false, 148), 2, ",", "."), "html", null, true);
|
|
yield "</span></div>
|
|
<div class=\"small\">A Pagar: <span class=\"text-danger fw-bold\">R\$ ";
|
|
// line 149
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, ($context["summary"] ?? null), "pending_expense", [], "any", false, false, false, 149), 2, ",", "."), "html", null, true);
|
|
yield "</span></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class=\"row mb-4\">
|
|
<!-- Gráfico Mensal -->
|
|
<div class=\"col-lg-6\">
|
|
<div class=\"card shadow-sm border-0 h-100\">
|
|
<div class=\"card-header bg-white border-0 py-3\">
|
|
<h6 class=\"m-0 font-weight-bold text-primary\">Fluxo Mensal (Histórico)</h6>
|
|
</div>
|
|
<div class=\"card-body\">
|
|
<canvas id=\"monthlyChart\" style=\"min-height: 300px;\"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Projeções -->
|
|
<div class=\"col-lg-6\">
|
|
<div class=\"card shadow-sm border-0 h-100\">
|
|
<div class=\"card-header bg-white border-0 py-3\">
|
|
<h6 class=\"m-0 font-weight-bold text-primary\">Projeção de Saldo (12 Meses)</h6>
|
|
</div>
|
|
<div class=\"card-body\">
|
|
<canvas id=\"projectionChart\" style=\"min-height: 300px;\"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class=\"row mb-4\">
|
|
<!-- IA Insights -->
|
|
<div class=\"col-lg-12\">
|
|
<div class=\"card shadow-sm border-0 h-100 bg-light\">
|
|
<div class=\"card-header bg-white border-0 py-3 d-flex justify-content-between align-items-center\">
|
|
<h6 class=\"m-0 font-weight-bold text-info\"><i class=\"bi bi-robot me-2\"></i>Insights da Inteligência Artificial</h6>
|
|
";
|
|
// line 188
|
|
if ((($tmp = ($context["latestAnalysis"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 189
|
|
yield " <small class=\"text-muted\">Última análise: ";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, ($context["latestAnalysis"] ?? null), "created_at", [], "any", false, false, false, 189), "d/m/Y H:i"), "html", null, true);
|
|
yield "</small>
|
|
";
|
|
}
|
|
// line 191
|
|
yield " </div>
|
|
<div class=\"card-body\">
|
|
<div class=\"row\">
|
|
<div class=\"col-md-3\">
|
|
";
|
|
// line 195
|
|
if ((($tmp = ($context["latestAnalysis"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 196
|
|
yield " <div class=\"mb-3\">
|
|
<small class=\"text-muted d-block mb-1\">Previsão de Saldo Próximo Mês:</small>
|
|
<span class=\"h4 fw-bold text-primary\">R\$ ";
|
|
// line 198
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["latestAnalysis"] ?? null), "summary_data", [], "any", false, false, false, 198), "predicted_balance", [], "any", false, false, false, 198), 2, ",", "."), "html", null, true);
|
|
yield "</span>
|
|
</div>
|
|
<div class=\"mb-3\">
|
|
<small class=\"text-muted d-block mb-1\">Nível de Risco Financeiro:</small>
|
|
";
|
|
// line 202
|
|
$context["risk"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["latestAnalysis"] ?? null), "summary_data", [], "any", false, false, false, 202), "risk_level", [], "any", false, false, false, 202);
|
|
// line 203
|
|
yield " <span class=\"badge fs-6 bg-";
|
|
yield (((($context["risk"] ?? null) == "High")) ? ("danger") : ((((($context["risk"] ?? null) == "Medium")) ? ("warning") : ("success"))));
|
|
yield "\">
|
|
";
|
|
// line 204
|
|
yield (((($context["risk"] ?? null) == "High")) ? ("Alto Risco") : ((((($context["risk"] ?? null) == "Medium")) ? ("Risco Médio") : ("Baixo Risco"))));
|
|
yield "
|
|
</span>
|
|
</div>
|
|
";
|
|
} else {
|
|
// line 208
|
|
yield " <div class=\"text-center py-4\">
|
|
<i class=\"bi bi-cpu fs-1 text-muted opacity-25\"></i>
|
|
<p class=\"text-muted mt-2 small\">Sem análise recente.</p>
|
|
</div>
|
|
";
|
|
}
|
|
// line 213
|
|
yield " </div>
|
|
<div class=\"col-md-9\">
|
|
";
|
|
// line 215
|
|
if ((($tmp = ($context["latestAnalysis"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 216
|
|
yield " <div class=\"p-3 bg-white rounded border\">
|
|
<h6 class=\"fw-bold mb-2\">Recomendações Estratégicas:</h6>
|
|
<p class=\"text-dark mb-0\" style=\"white-space: pre-line;\">";
|
|
// line 218
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["latestAnalysis"] ?? null), "recommendations", [], "any", false, false, false, 218), "html", null, true);
|
|
yield "</p>
|
|
</div>
|
|
";
|
|
} else {
|
|
// line 221
|
|
yield " <div class=\"alert alert-info mb-0\">
|
|
<i class=\"bi bi-info-circle me-2\"></i> Clique no botão <strong>Análise IA</strong> no topo para que nosso sistema examine seu fluxo de caixa e forneça recomendações personalizadas baseadas em melhores práticas de gestão financeira.
|
|
</div>
|
|
";
|
|
}
|
|
// line 225
|
|
yield " </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Últimas Transações -->
|
|
<div class=\"card shadow-sm border-0 mb-4\">
|
|
<div class=\"card-header bg-white border-0 py-3\">
|
|
<h6 class=\"m-0 font-weight-bold text-primary\">Últimas Transações</h6>
|
|
</div>
|
|
<div class=\"card-body p-0\">
|
|
<div class=\"table-responsive\">
|
|
<table class=\"table table-hover align-middle mb-0\">
|
|
<thead class=\"bg-light\">
|
|
<tr>
|
|
<th class=\"ps-4\">Data</th>
|
|
<th>Descrição</th>
|
|
<th>Categoria</th>
|
|
<th>Tipo</th>
|
|
<th>Valor</th>
|
|
<th>Status</th>
|
|
<th class=\"text-end pe-4\">Ações</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
";
|
|
// line 252
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = CoreExtension::ensureTraversable(($context["latestTransactions"] ?? null));
|
|
$context['_iterated'] = false;
|
|
foreach ($context['_seq'] as $context["_key"] => $context["trans"]) {
|
|
// line 253
|
|
yield " <tr>
|
|
<td class=\"ps-4 small\">
|
|
<span class=\"text-muted d-block\">";
|
|
// line 255
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "transaction_date", [], "any", false, false, false, 255), "d/m/Y"), "html", null, true);
|
|
yield "</span>
|
|
";
|
|
// line 256
|
|
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "due_date", [], "any", false, false, false, 256)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 257
|
|
yield " <small class=\"text-info\">Venc: ";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "due_date", [], "any", false, false, false, 257), "d/m/Y"), "html", null, true);
|
|
yield "</small>
|
|
";
|
|
}
|
|
// line 259
|
|
yield " </td>
|
|
<td>
|
|
";
|
|
// line 261
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "description", [], "any", false, false, false, 261), "html", null, true);
|
|
yield "
|
|
";
|
|
// line 262
|
|
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "is_personal", [], "any", false, false, false, 262)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
|
|
// line 263
|
|
yield " <span class=\"badge bg-secondary ms-1\" title=\"Despesa/Receita Pessoal\">Pessoal</span>
|
|
";
|
|
}
|
|
// line 265
|
|
yield " </td>
|
|
<td>
|
|
<span class=\"badge\" style=\"background-color: ";
|
|
// line 267
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "category", [], "any", false, false, false, 267), "color", [], "any", false, false, false, 267), "html", null, true);
|
|
yield ";\">
|
|
<i class=\"";
|
|
// line 268
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "category", [], "any", false, false, false, 268), "icon", [], "any", false, false, false, 268), "html", null, true);
|
|
yield " me-1\"></i>";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "category", [], "any", false, false, false, 268), "name", [], "any", false, false, false, 268), "html", null, true);
|
|
yield "
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class=\"text-";
|
|
// line 272
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "type", [], "any", false, false, false, 272) == "income")) ? ("success") : ("danger"));
|
|
yield " small fw-bold\">
|
|
";
|
|
// line 273
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "type", [], "any", false, false, false, 273) == "income")) ? ("Entrada") : ("Saída"));
|
|
yield "
|
|
</span>
|
|
</td>
|
|
<td class=\"fw-bold ";
|
|
// line 276
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "type", [], "any", false, false, false, 276) == "income")) ? ("text-success") : ("text-danger"));
|
|
yield "\">
|
|
";
|
|
// line 277
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "type", [], "any", false, false, false, 277) == "income")) ? ("+") : ("-"));
|
|
yield " R\$ ";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(abs(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "amount", [], "any", false, false, false, 277)), 2, ",", "."), "html", null, true);
|
|
yield "
|
|
</td>
|
|
<td>
|
|
<span class=\"badge bg-";
|
|
// line 280
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "status", [], "any", false, false, false, 280) == "paid")) ? ("success") : ("warning"));
|
|
yield "\">
|
|
";
|
|
// line 281
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "status", [], "any", false, false, false, 281) == "paid")) ? ("Pago") : ("Pendente"));
|
|
yield "
|
|
</span>
|
|
</td>
|
|
<td class=\"text-end pe-4\">
|
|
<div class=\"btn-group btn-group-sm\">
|
|
";
|
|
// line 286
|
|
if ((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "status", [], "any", false, false, false, 286) == "pending")) {
|
|
// line 287
|
|
yield " <form action=\"";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/fluxo-caixa/transaction/pay/" . CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 287))), "html", null, true);
|
|
yield "\" method=\"POST\" class=\"d-inline\">
|
|
<button type=\"submit\" class=\"btn btn-outline-success\" title=\"Marcar como Pago\">
|
|
<i class=\"bi bi-check2-circle\"></i>
|
|
</button>
|
|
</form>
|
|
";
|
|
}
|
|
// line 293
|
|
yield " <button type=\"button\" class=\"btn btn-outline-primary\"
|
|
data-bs-toggle=\"modal\"
|
|
data-bs-target=\"#editTransactionModal";
|
|
// line 295
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 295), "html", null, true);
|
|
yield "\"
|
|
title=\"Editar\">
|
|
<i class=\"bi bi-pencil\"></i>
|
|
</button>
|
|
<button type=\"button\" class=\"btn btn-outline-danger\"
|
|
data-bs-toggle=\"modal\"
|
|
data-bs-target=\"#deleteTransactionModal";
|
|
// line 301
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 301), "html", null, true);
|
|
yield "\"
|
|
title=\"Excluir\">
|
|
<i class=\"bi bi-trash\"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Modal Editar Transação -->
|
|
<div class=\"modal fade\" id=\"editTransactionModal";
|
|
// line 308
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 308), "html", null, true);
|
|
yield "\" tabindex=\"-1\" aria-hidden=\"true\">
|
|
<div class=\"modal-dialog text-start\">
|
|
<div class=\"modal-content\">
|
|
<div class=\"modal-header\">
|
|
<h5 class=\"modal-title\">Editar Transação</h5>
|
|
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
|
|
</div>
|
|
<form action=\"";
|
|
// line 315
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/fluxo-caixa/transaction/update/" . CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 315))), "html", null, true);
|
|
yield "\" method=\"POST\">
|
|
<div class=\"modal-body\">
|
|
<div class=\"mb-3\">
|
|
<label class=\"form-label\">Descrição</label>
|
|
<input type=\"text\" name=\"description\" class=\"form-control\" value=\"";
|
|
// line 319
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "description", [], "any", false, false, false, 319), "html", null, true);
|
|
yield "\" required>
|
|
</div>
|
|
<div class=\"row\">
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Valor (R\$)</label>
|
|
<input type=\"number\" step=\"0.01\" name=\"amount\" class=\"form-control\" value=\"";
|
|
// line 324
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "amount", [], "any", false, false, false, 324), "html", null, true);
|
|
yield "\" required>
|
|
</div>
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Data Lançamento</label>
|
|
<input type=\"date\" name=\"transaction_date\" class=\"form-control\" value=\"";
|
|
// line 328
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "transaction_date", [], "any", false, false, false, 328), "Y-m-d"), "html", null, true);
|
|
yield "\" required>
|
|
</div>
|
|
</div>
|
|
<div class=\"row\">
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Data Vencimento</label>
|
|
<input type=\"date\" name=\"due_date\" class=\"form-control\" value=\"";
|
|
// line 334
|
|
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "due_date", [], "any", false, false, false, 334)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "due_date", [], "any", false, false, false, 334), "Y-m-d"), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Data Pagamento</label>
|
|
<input type=\"date\" name=\"payment_date\" class=\"form-control\" value=\"";
|
|
// line 338
|
|
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "payment_date", [], "any", false, false, false, 338)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "payment_date", [], "any", false, false, false, 338), "Y-m-d"), "html", null, true)) : (""));
|
|
yield "\">
|
|
</div>
|
|
</div>
|
|
<div class=\"row\">
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Tipo</label>
|
|
<select name=\"type\" class=\"form-select\">
|
|
<option value=\"income\" ";
|
|
// line 345
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "type", [], "any", false, false, false, 345) == "income")) ? ("selected") : (""));
|
|
yield ">Receita</option>
|
|
<option value=\"expense\" ";
|
|
// line 346
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "type", [], "any", false, false, false, 346) == "expense")) ? ("selected") : (""));
|
|
yield ">Despesa</option>
|
|
</select>
|
|
</div>
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Categoria</label>
|
|
<select name=\"category_id\" class=\"form-select\" required>
|
|
";
|
|
// line 352
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = CoreExtension::ensureTraversable(($context["categories_all"] ?? null));
|
|
foreach ($context['_seq'] as $context["_key"] => $context["cat"]) {
|
|
// line 353
|
|
yield " <option value=\"";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "id", [], "any", false, false, false, 353), "html", null, true);
|
|
yield "\" ";
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "id", [], "any", false, false, false, 353) == CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "category_id", [], "any", false, false, false, 353))) ? ("selected") : (""));
|
|
yield ">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "name", [], "any", false, false, false, 353), "html", null, true);
|
|
yield "</option>
|
|
";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_key'], $context['cat'], $context['_parent']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 355
|
|
yield " </select>
|
|
</div>
|
|
</div>
|
|
<div class=\"row align-items-center mb-3\">
|
|
<div class=\"col-md-6\">
|
|
<label class=\"form-label\">Status</label>
|
|
<div class=\"d-flex gap-3\">
|
|
<div class=\"form-check\">
|
|
<input class=\"form-check-input\" type=\"radio\" name=\"status\" value=\"paid\" ";
|
|
// line 363
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "status", [], "any", false, false, false, 363) == "paid")) ? ("checked") : (""));
|
|
yield ">
|
|
<label class=\"form-check-label\">Pago</label>
|
|
</div>
|
|
<div class=\"form-check\">
|
|
<input class=\"form-check-input\" type=\"radio\" name=\"status\" value=\"pending\" ";
|
|
// line 367
|
|
yield (((CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "status", [], "any", false, false, false, 367) == "pending")) ? ("checked") : (""));
|
|
yield ">
|
|
<label class=\"form-check-label\">Pendente</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-6 pt-4\">
|
|
<div class=\"form-check form-switch\">
|
|
<input class=\"form-check-input\" type=\"checkbox\" name=\"is_personal\" value=\"1\" id=\"editIsPersonal";
|
|
// line 374
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 374), "html", null, true);
|
|
yield "\" ";
|
|
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "is_personal", [], "any", false, false, false, 374)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("checked") : (""));
|
|
yield ">
|
|
<label class=\"form-check-label\" for=\"editIsPersonal";
|
|
// line 375
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 375), "html", null, true);
|
|
yield "\">Gasto Pessoal?</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"mb-3\">
|
|
<label class=\"form-label\">Observações</label>
|
|
<textarea name=\"notes\" class=\"form-control\" rows=\"2\">";
|
|
// line 381
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "notes", [], "any", false, false, false, 381), "html", null, true);
|
|
yield "</textarea>
|
|
</div>
|
|
</div>
|
|
<div class=\"modal-footer\">
|
|
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancelar</button>
|
|
<button type=\"submit\" class=\"btn btn-primary\">Salvar Alterações</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal Excluir Transação -->
|
|
<div class=\"modal fade\" id=\"deleteTransactionModal";
|
|
// line 394
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 394), "html", null, true);
|
|
yield "\" tabindex=\"-1\" aria-hidden=\"true\">
|
|
<div class=\"modal-dialog text-start\">
|
|
<div class=\"modal-content\">
|
|
<div class=\"modal-header\">
|
|
<h5 class=\"modal-title\">Excluir Transação</h5>
|
|
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
|
|
</div>
|
|
<div class=\"modal-body\">
|
|
<p>Tem certeza que deseja excluir a transação <strong>\"";
|
|
// line 402
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "description", [], "any", false, false, false, 402), "html", null, true);
|
|
yield "\"</strong>?</p>
|
|
<p class=\"text-danger small\"><i class=\"bi bi-exclamation-triangle me-1\"></i> Esta ação não pode ser desfeita.</p>
|
|
</div>
|
|
<div class=\"modal-footer\">
|
|
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancelar</button>
|
|
<form action=\"";
|
|
// line 407
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()(("/admin/fluxo-caixa/transaction/delete/" . CoreExtension::getAttribute($this->env, $this->source, $context["trans"], "id", [], "any", false, false, false, 407))), "html", null, true);
|
|
yield "\" method=\"POST\">
|
|
<button type=\"submit\" class=\"btn btn-danger\">Excluir</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
";
|
|
$context['_iterated'] = true;
|
|
}
|
|
// line 416
|
|
if (!$context['_iterated']) {
|
|
// line 417
|
|
yield " <tr>
|
|
<td colspan=\"5\" class=\"text-center py-4 text-muted\">Nenhuma transação encontrada.</td>
|
|
</tr>
|
|
";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_key'], $context['trans'], $context['_parent'], $context['_iterated']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 421
|
|
yield " </tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal Nova Transação -->
|
|
<div class=\"modal fade\" id=\"newTransactionModal\" tabindex=\"-1\" aria-hidden=\"true\">
|
|
<div class=\"modal-dialog\">
|
|
<div class=\"modal-content\">
|
|
<div class=\"modal-header\">
|
|
<h5 class=\"modal-title\">Nova Transação</h5>
|
|
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
|
|
</div>
|
|
<form action=\"";
|
|
// line 436
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa/transaction"), "html", null, true);
|
|
yield "\" method=\"POST\">
|
|
<div class=\"modal-body\">
|
|
<div class=\"mb-3\">
|
|
<label class=\"form-label\">Descrição</label>
|
|
<input type=\"text\" name=\"description\" class=\"form-control\" required placeholder=\"Ex: Pagamento Fornecedor X\">
|
|
</div>
|
|
<div class=\"row\">
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Valor (R\$)</label>
|
|
<input type=\"number\" step=\"0.01\" name=\"amount\" class=\"form-control\" required>
|
|
</div>
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Data Lançamento</label>
|
|
<input type=\"date\" name=\"transaction_date\" class=\"form-control\" value=\"";
|
|
// line 449
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate("now", "Y-m-d"), "html", null, true);
|
|
yield "\" required>
|
|
</div>
|
|
</div>
|
|
<div class=\"row\">
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Data Vencimento</label>
|
|
<input type=\"date\" name=\"due_date\" class=\"form-control\">
|
|
</div>
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Data Pagamento</label>
|
|
<input type=\"date\" name=\"payment_date\" class=\"form-control\">
|
|
</div>
|
|
</div>
|
|
<div class=\"row\">
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Tipo</label>
|
|
<select name=\"type\" class=\"form-select\" id=\"trans_type\">
|
|
<option value=\"income\">Receita</option>
|
|
<option value=\"expense\" selected>Despesa</option>
|
|
</select>
|
|
</div>
|
|
<div class=\"col-md-6 mb-3\">
|
|
<label class=\"form-label\">Categoria</label>
|
|
<select name=\"category_id\" class=\"form-select\" required>
|
|
";
|
|
// line 473
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = CoreExtension::ensureTraversable(($context["categories_all"] ?? null));
|
|
foreach ($context['_seq'] as $context["_key"] => $context["cat"]) {
|
|
// line 474
|
|
yield " <option value=\"";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "id", [], "any", false, false, false, 474), "html", null, true);
|
|
yield "\" data-type=\"";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "type", [], "any", false, false, false, 474), "html", null, true);
|
|
yield "\">";
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["cat"], "name", [], "any", false, false, false, 474), "html", null, true);
|
|
yield "</option>
|
|
";
|
|
}
|
|
$_parent = $context['_parent'];
|
|
unset($context['_seq'], $context['_key'], $context['cat'], $context['_parent']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 476
|
|
yield " </select>
|
|
</div>
|
|
</div>
|
|
<div class=\"row align-items-center mb-3\">
|
|
<div class=\"col-md-6\">
|
|
<label class=\"form-label\">Status</label>
|
|
<div class=\"d-flex gap-3\">
|
|
<div class=\"form-check\">
|
|
<input class=\"form-check-input\" type=\"radio\" name=\"status\" value=\"paid\" checked>
|
|
<label class=\"form-check-label\">Pago</label>
|
|
</div>
|
|
<div class=\"form-check\">
|
|
<input class=\"form-check-input\" type=\"radio\" name=\"status\" value=\"pending\">
|
|
<label class=\"form-check-label\">Pendente</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"col-md-6 pt-4\">
|
|
<div class=\"form-check form-switch\">
|
|
<input class=\"form-check-input\" type=\"checkbox\" name=\"is_personal\" value=\"1\" id=\"isPersonalSwitch\">
|
|
<label class=\"form-check-label\" for=\"isPersonalSwitch\">Gasto Pessoal?</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class=\"mb-3\">
|
|
<label class=\"form-label\">Observações</label>
|
|
<textarea name=\"notes\" class=\"form-control\" rows=\"2\"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class=\"modal-footer\">
|
|
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancelar</button>
|
|
<button type=\"submit\" class=\"btn btn-primary\">Salvar Transação</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal Conciliação Bancária -->
|
|
<div class=\"modal fade\" id=\"reconcileModal\" tabindex=\"-1\" aria-hidden=\"true\">
|
|
<div class=\"modal-dialog\">
|
|
<div class=\"modal-content\">
|
|
<div class=\"modal-header\">
|
|
<h5 class=\"modal-title\">Conciliação Bancária</h5>
|
|
<button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>
|
|
</div>
|
|
<form action=\"";
|
|
// line 522
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("/admin/fluxo-caixa/reconcile"), "html", null, true);
|
|
yield "\" method=\"POST\">
|
|
<div class=\"modal-body\">
|
|
<p class=\"small text-muted mb-3\">
|
|
Insira o saldo atual que aparece no extrato do seu banco para comparar com o saldo registrado no sistema.
|
|
</p>
|
|
<div class=\"mb-3\">
|
|
<label class=\"form-label\">Saldo Atual no Banco (R\$)</label>
|
|
<input type=\"number\" step=\"0.01\" name=\"bank_balance\" class=\"form-control\" required placeholder=\"0,00\">
|
|
</div>
|
|
<div class=\"alert alert-info py-2 small mb-0\">
|
|
<i class=\"bi bi-info-circle me-1\"></i> O sistema utilizará o <strong>Saldo Líquido Total</strong> (Empresa + Pessoal) para esta conferência.
|
|
</div>
|
|
</div>
|
|
<div class=\"modal-footer\">
|
|
<button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">Cancelar</button>
|
|
<button type=\"submit\" class=\"btn btn-primary\">Conciliar Agora</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
";
|
|
// line 544
|
|
yield from $this->unwrap()->yieldBlock('scripts', $context, $blocks);
|
|
yield from [];
|
|
}
|
|
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_scripts(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
// line 545
|
|
yield "<script>
|
|
const monthlyData = ";
|
|
// line 546
|
|
yield ($context["monthlyBreakdown"] ?? null);
|
|
yield ";
|
|
const projectionsData = ";
|
|
// line 547
|
|
yield ($context["projections"] ?? null);
|
|
yield ";
|
|
|
|
// Configuração comum para tooltips de moeda
|
|
const currencyTooltip = {
|
|
callbacks: {
|
|
label: function(context) {
|
|
let label = context.dataset.label || '';
|
|
if (label) label += ': ';
|
|
if (context.parsed.y !== null) {
|
|
label += 'R\$ ' + context.parsed.y.toLocaleString('pt-BR', {minimumFractionDigits: 2});
|
|
}
|
|
return label;
|
|
}
|
|
}
|
|
};
|
|
|
|
// Gráfico Histórico
|
|
const ctxMonthly = document.getElementById('monthlyChart').getContext('2d');
|
|
new Chart(ctxMonthly, {
|
|
type: 'bar',
|
|
data: {
|
|
labels: monthlyData.map(d => d.month),
|
|
datasets: [
|
|
{
|
|
label: 'Receitas',
|
|
data: monthlyData.map(d => d.income),
|
|
backgroundColor: 'rgba(25, 135, 84, 0.7)',
|
|
borderColor: 'rgb(25, 135, 84)',
|
|
borderWidth: 1
|
|
},
|
|
{
|
|
label: 'Despesas',
|
|
data: monthlyData.map(d => d.expense),
|
|
backgroundColor: 'rgba(220, 53, 69, 0.7)',
|
|
borderColor: 'rgb(220, 53, 69)',
|
|
borderWidth: 1
|
|
}
|
|
]
|
|
},
|
|
options: {
|
|
responsive: true,
|
|
maintainAspectRatio: false,
|
|
scales: {
|
|
y: {
|
|
beginAtZero: true,
|
|
ticks: {
|
|
callback: function(value) {
|
|
return 'R\$ ' + value.toLocaleString('pt-BR');
|
|
}
|
|
}
|
|
}
|
|
},
|
|
plugins: {
|
|
tooltip: currencyTooltip
|
|
}
|
|
}
|
|
});
|
|
|
|
// Gráfico de Projeções
|
|
const ctxProjection = document.getElementById('projectionChart').getContext('2d');
|
|
new Chart(ctxProjection, {
|
|
type: 'line',
|
|
data: {
|
|
labels: projectionsData.map(d => d.month),
|
|
datasets: [
|
|
{
|
|
label: 'Cenário Otimista',
|
|
data: projectionsData.map(d => d.optimistic.balance),
|
|
borderColor: 'rgba(25, 135, 84, 0.8)',
|
|
backgroundColor: 'rgba(25, 135, 84, 0.1)',
|
|
borderDash: [5, 5],
|
|
fill: false,
|
|
tension: 0.4
|
|
},
|
|
{
|
|
label: 'Cenário Realista',
|
|
data: projectionsData.map(d => d.realistic.balance),
|
|
borderColor: 'rgba(13, 202, 240, 1)',
|
|
backgroundColor: 'rgba(13, 202, 240, 0.1)',
|
|
fill: true,
|
|
tension: 0.4,
|
|
borderWidth: 3
|
|
},
|
|
{
|
|
label: 'Cenário Pessimista',
|
|
data: projectionsData.map(d => d.pessimistic.balance),
|
|
borderColor: 'rgba(220, 53, 69, 0.8)',
|
|
backgroundColor: 'rgba(220, 53, 69, 0.1)',
|
|
borderDash: [5, 5],
|
|
fill: false,
|
|
tension: 0.4
|
|
}
|
|
]
|
|
},
|
|
options: {
|
|
responsive: true,
|
|
maintainAspectRatio: false,
|
|
scales: {
|
|
y: {
|
|
ticks: {
|
|
callback: function(value) {
|
|
return 'R\$ ' + value.toLocaleString('pt-BR');
|
|
}
|
|
}
|
|
}
|
|
},
|
|
plugins: {
|
|
tooltip: currencyTooltip
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
";
|
|
yield from [];
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getTemplateName(): string
|
|
{
|
|
return "@fluxocaixapro/admin/index.twig";
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function isTraitable(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getDebugInfo(): array
|
|
{
|
|
return array ( 919 => 547, 915 => 546, 912 => 545, 901 => 544, 876 => 522, 828 => 476, 815 => 474, 811 => 473, 784 => 449, 768 => 436, 751 => 421, 742 => 417, 740 => 416, 726 => 407, 718 => 402, 707 => 394, 691 => 381, 682 => 375, 676 => 374, 666 => 367, 659 => 363, 649 => 355, 636 => 353, 632 => 352, 623 => 346, 619 => 345, 609 => 338, 602 => 334, 593 => 328, 586 => 324, 578 => 319, 571 => 315, 561 => 308, 551 => 301, 542 => 295, 538 => 293, 528 => 287, 526 => 286, 518 => 281, 514 => 280, 506 => 277, 502 => 276, 496 => 273, 492 => 272, 483 => 268, 479 => 267, 475 => 265, 471 => 263, 469 => 262, 465 => 261, 461 => 259, 455 => 257, 453 => 256, 449 => 255, 445 => 253, 440 => 252, 411 => 225, 405 => 221, 399 => 218, 395 => 216, 393 => 215, 389 => 213, 382 => 208, 375 => 204, 370 => 203, 368 => 202, 361 => 198, 357 => 196, 355 => 195, 349 => 191, 343 => 189, 341 => 188, 299 => 149, 295 => 148, 280 => 136, 275 => 134, 271 => 133, 256 => 121, 252 => 120, 237 => 108, 233 => 107, 213 => 90, 202 => 82, 198 => 81, 188 => 74, 184 => 73, 174 => 66, 170 => 65, 160 => 58, 155 => 56, 145 => 48, 138 => 44, 135 => 43, 133 => 42, 124 => 36, 116 => 31, 107 => 25, 99 => 20, 95 => 18, 88 => 17, 74 => 6, 67 => 5, 54 => 3, 43 => 1,);
|
|
}
|
|
|
|
public function getSourceContext(): Source
|
|
{
|
|
return new Source("", "@fluxocaixapro/admin/index.twig", "/app/modules/fluxocaixapro/views/admin/index.twig");
|
|
}
|
|
}
|