first commit

This commit is contained in:
2026-01-02 09:19:43 -03:00
parent 63cf724aaf
commit cc44b7ef4f
187 changed files with 2484 additions and 686 deletions

View File

@@ -0,0 +1,24 @@
<h3> Professional </h3>
<div class="row">
<table class="table">
<thead>
<tr>
<th>Banco</th>
<th>Total</th>
</tr>
</thead>
<tbody>
{% for Prof, sum in Professional.professional.items %}
{% if sum != 0 %}
<tr class="table table-striped" >
<td>{{ Prof }}</td>
<td>R$ {{ sum|floatformat:2 }}</td>
</tr>
{% endif %}
{% empty %} <tr> <td colspan="2"> Vazio. </td> </tr> {% endfor %}
</tbody>
</table>
<p> Total : R$: {{ Professional.sum_all_prof|floatformat:2 }}</p>
</div>
<br>

View File

@@ -0,0 +1,24 @@
<h3> Serviço </h3>
<div class="row">
<table class="table">
<thead>
<tr>
<th>Produtos</th>
<th>Total</th>
</tr>
</thead>
<tbody>
{% for Prod, sum in Service.Service.items %}
{% if sum != 0 %}
<tr class="table table-striped" >
<td>{{ Prod }}</td>
<td>R$ {{ sum|floatformat:2 }}</td>
</tr>
{% endif %}
{% empty %} <tr> <td colspan="2"> Vazio. </td> </tr> {% endfor %}
</tbody>
</table>
<p> Total R$: {{ Service.sum|floatformat:2 }}</p>
</div>
<br>

View File

@@ -0,0 +1,31 @@
<div class="container-fluid mt-2 bg-dark text-light p-2" style="font-size: 0.85rem;">
<h6 class="text-secondary text-uppercase border-bottom border-secondary pb-1 mb-2">
<i class="bi bi-cart me-1"></i>Produtos
</h6>
<div class="border border-secondary rounded overflow-hidden">
<div class="d-flex justify-content-between px-2 py-1 bg-black bg-opacity-40 text-secondary" style="font-size: 0.7rem;">
<span>PRODUTO (QTD)</span>
<span>TOTAL</span>
</div>
{% for name, value in Sum_of_product.product_report.items %}
{% if value.product_item != 0 %}
<div class="d-flex justify-content-between align-items-center p-1 px-2 border-bottom border-secondary border-opacity-25 bg-opacity-5">
<span class="text-truncate" style="max-width: 70%;">
{{ name }}
<span class="badge bg-secondary ms-1" style="font-size: 0.65rem;">{{ value.product_cont }}x</span>
</span>
<span class="fw-bold">R$ {{ value.product_item|floatformat:2 }}</span>
</div>
{% endif %}
{% empty %}
<div class="p-2 text-center text-muted italic">Vazio.</div>
{% endfor %}
<div class="d-flex justify-content-between align-items-center p-1 px-2 bg-black bg-opacity-50">
<span class="text-uppercase" style="font-size: 0.7rem;">Total da Venda</span>
<span class="text-warning fw-bold">R$ {{ Sum_of_product.sum_of_product|floatformat:2 }}</span>
</div>
</div>
</div>

View File

@@ -0,0 +1,40 @@
<div class="container-fluid mt-2 bg-dark text-light p-2" style="font-size: 0.85rem;">
<h5 class="text-center mb-3 border-bottom border-secondary pb-2 text-uppercase">Resumo de Atendimentos</h5>
<div class="row">
{% for prof_name, services in Sum_of_professional_detail.professionals_report.items %}
<div class="col-12 mb-2">
<div class="border border-secondary rounded p-2 bg-black bg-opacity-10">
<div class="d-flex justify-content-between align-items-center mb-1">
<span class="fw-bold text-info">{{ prof_name }}</span>
</div>
{% for service_name, data in services.items %}
{% if data.servCont > 0 %}
<div class="ps-2 mb-1 border-start border-secondary">
<div class="d-flex justify-content-between " style="font-size: 0.75rem;">
<span>{{ service_name }} ({{ data.servCont }})</span>
<span class="fw-bold">R$ {{ data.servSum|floatformat:2 }}</span>
</div>
{% for client in data.clients %}
<div class="d-flex justify-content-between py-0 px-1 border-bottom border-secondary border-opacity-25 bg-opacity-5">
<span>{{ client.time }} <span class="text-truncate" style="max-width: 60%;">{{ client.name }}</span></span>
<span class="text-success ms-2">R${{ client.value|floatformat:0 }}</span>
</div>
{% endfor %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endfor %}
</div>
<div class="mt-3 p-2 bg-black rounded d-flex justify-content-between align-items-center border border-success border-opacity-50">
<small class="text-secondary text-uppercase">Total Geral</small>
<h6 class="mb-0 text-success">R$ {{ Sum_of_professional_detail.sum_of_prof|floatformat:2 }}</h6>
</div>
</div>
{#<p> Total de Hoje : R$: {{ Sum_of_professional_detail.sum_of_prof|floatformat:2 }}</p>#}
<br>

View File

@@ -0,0 +1,23 @@
<div class="container-fluid mt-2 bg-dark text-light p-2" style="font-size: 0.85rem;">
<h6 class="text-secondary text-uppercase border-bottom border-secondary pb-1 mb-2">
<i class="bi bi-bank me-1"></i>Pagamentos
</h6>
<div class="border border-secondary rounded overflow-hidden">
{% for name, value in Sum_payment_method_service.bank_balance.items %}
{% if value != 0 %}
<div class="d-flex justify-content-between align-items-center p-1 px-2 border-bottom border-secondary border-opacity-25 bg-opacity-5">
<span class="">{{ name }}</span>
<span class="fw-bold">R$ {{ value|floatformat:2 }}</span>
</div>
{% endif %}
{% empty %}
<div class="p-2 text-center text-muted italic">Vazio</div>
{% endfor %}
<div class="d-flex justify-content-between align-items-center p-1 px-2 bg-black bg-opacity-50">
<span class="text-uppercase" style="font-size: 0.7rem;">Total Banco</span>
<span class="text-info fw-bold">R$ {{ Sum_payment_method_service.sum_of_bank|floatformat:2 }}</span>
</div>
</div>
</div>

View File

@@ -0,0 +1,24 @@
{% extends "BaseLogin.html" %}
{% block title %} Dashboard {% endblock %}
{% block content %}
<div class="row">
<div class="col-md-3">
{% include 'Dashboards/Dashboard/Sum_of_professional_detail.html' %}
</div>
<div class="col-md-3">
{% include 'Dashboards/Dashboard/Sum_payment_method_service.html' %}
{% include 'Dashboards/Dashboard/Sum_of_product.html' %}
</div>
</div>
{#<div class="row">#}
{# <div class="col-2">#}
{# <div class="col-md-12">{% include 'Dashboards/Dashboard/Professional.html' %} </div>#}
{# <div class="col-md-12">{% include 'Dashboards/Dashboard/Service.html' %} </div>#}
{# </div>#}
{#</div>#}
{# <br>#}
{% endblock %}

View File

@@ -0,0 +1,51 @@
<div class="container mt-5">
<div class="row">
<div class="col-12">
<div class="card shadow">
<div class="card-header bg-dark d-flex justify-content-between align-items-center">
<h4 class="mb-0 text-white">Relatório de Métricas de Estoque</h4>
<span class="badge bg-primary">Total de Itens: {{ Stone.Stone|length }}</span>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-dark table-hover mb-0">
<thead class="table">
<tr>
<th>Produto</th>
<th class="text-center">Q. Estoque</th>
<th>Custo Bruto </th>
<th>Valor Adquirido </th>
<th>Preço Unit. Compra</th>
</tr>
</thead>
<tbody>
{% for item in Stone.Stone %}
<tr>
<td class="fw-bold text-info">{{ item.produto }}</td>
<td class="text-center">
<span class="badge {% if item.quantidade_estoque > 0 %}bg-success{% else %}bg-danger{% endif %}">
{{ item.quantidade_estoque }}
</span>
</td>
<td>R$ {{ item.valor_total_estoque_bruto|floatformat:2 }}</td>
<td class="text-success-custom">R$ {{ item.valor_total_estoque_liquido|floatformat:2 }}</td>
<td class="text-text-success-custom">R$ {{ item.valor_unitario_compra_medio|floatformat:2 }}</td>
</tr>
{% empty %}
<tr>
<td colspan="5" class="text-center py-4 text-muted">Nenhum registro encontrado.</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{# <div class="card-footer bg-dark text-muted">#}
{# <small>Gerado em: {% now "d/m/Y H:i" %}</small>#}
{# </div>#}
</div>
</div>
</div>
</div>
{#{{Stone.}}#}

View File

@@ -0,0 +1,22 @@
{% extends "BaseLogin.html" %}
{% block title %} Dashboard Admin {% endblock %}
{% block content %}
<div class="row">
<div class="col-md-2"> {% include 'Dashboards/DashboardAdmin/total_banck.html' %} </div>
<div class="col-md-3"> {% include 'Dashboards/DashboardAdmin/total_expense.html' %} </div>
<div class="col-md-4"> {% include 'Dashboards/DashboardAdmin/total_firm.html' %} </div>
{# <div class="col-md-3"> {% include 'Dashboards/DashboardAdmin/total_prof_month.html' %} </div>#}
{# <div class="col-md-3"> {% include 'Dashboards/DashboardAdmin/total_expense_prof.html' %} </div>#}
{# <div class="col-md-3"> {% include 'Dashboards/DashboardAdmin/total_credit_prof.html' %} </div>#}
<div class="col-md-2"> {% include 'Dashboards/DashboardAdmin/list-group.html' %} </div>
</div>
<div class="row">
<div class="col-12">
<div class="col-md-6">{% include 'Dashboards/DashboardAdmin/Stone.html' %} </div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,11 @@
<ul class="list-group list-group-flush">
<li class="list-group-item"><a href="{% url 'ProfessionalListView' %}" > Professional </a></li>
<li class="list-group-item"><a href="{% url 'BankAccountsListView' %}" > Banks </a></li>
<li class="list-group-item"><a href="{% url 'PayMethodListView' %}" > Meio de Pagamento </a></li>
<li class="list-group-item"><a href="{% url 'ServiceListListView' %}" > Lista de Serviços </a></li>
<li class="list-group-item"><a href="{% url 'ProductListListView' %}" > Lista de Produtos </a></li>
<li class="list-group-item"><a href="{% url 'ChartOfAccountListView' %}" > Plano de Contas </a></li>
<li class="list-group-item"><a href="{% url 'MovStockListView' %}" > Estoque </a></li>
<li class="list-group-item"><a href="{% url 'MovProductListView' %}" > Venda de Produtos </a></li>
<li class="list-group-item"><a href="{% url 'MovTransitionListView' %}" > Trans. de Contas </a></li>
</ul>

View File

@@ -0,0 +1,38 @@
<div class="card shadow-sm mb-4">
<div class="card-header ">
<h3 class="h5 mb-0">Resumo por Banco</h3>
</div>
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<thead class="table">
<tr>
<th>Banco</th>
<th class="text-end">Total</th>
</tr>
</thead>
<tbody>
{% for name, value in total_bank.sum_total.items %}
<tr>
<td class="fw-bold ">{{ name }}</td>
<td class="text-end ">R$ {{ value|floatformat:2 }}</td>
</tr>
{% empty %}
<tr>
<td colspan="2" class="text-center text-muted py-4">
<i>Nenhum dado encontrado.</i>
</td>
</tr>
{% endfor %}
</tbody>
{% if total_bank.sum_total %}
<tfoot class="table-group-divider">
<tr class="table">
<td class="fw-bold">Total Geral</td>
<td class="text-end fw-bold">R$ {{ total_bank.sum_all|floatformat:2 }}</td>
</tr>
</tfoot>
{% endif %}
</table>
</div>
</div>

View File

@@ -0,0 +1,23 @@
<h3> Credito do Prof. </h3>
<table class="table">
<thead>
<tr>
<th>Banco</th>
<th>Total</th>
</tr>
</thead>
<tbody>
{% for name, value in total_credit_prof.sum_total.items %}
<tr class="table table-striped" >
<td>{{ name }}</td>
<td>R$ {{ value|floatformat:2 }}</td>
</tr>
{% empty %}
<tr>
<td colspan="2"> Vazio. </td>
</tr>
{% endfor %}
</tbody>
</table>
Todos os bancos R$ {{ total_credit_prof.sum_all |floatformat:2 }}

View File

@@ -0,0 +1,48 @@
<div class="container mt-4">
<h4 class="mb-4 text">Relatório de Despesas</h4>
<div class="table-responsive">
<table class="table table-hover border">
<thead class="table-dark">
<tr>
<th scope="col">Data</th>
<th scope="col">Descrição</th>
<th scope="col">Valor</th>
</tr>
</thead>
<tbody>
{% for bank_name, info in total_expense.grouped_data.items %}
<tr>
<td colspan="3" class="text-primary fw-bold border-bottom-0 pt-3">
{{ bank_name|upper }}
</td>
</tr>
{% for item in info.registros %}
<tr>
<td class="ps-4 text-muted">{{ item.date|date:"d/m/Y" }}</td>
<td>{{ item.chart_of_account }}</td>
<td>R$ {{ item.gross_value|floatformat:2 }}</td>
</tr>
{% endfor %}
<tr class="table">
<td colspan="2" class="text-end text-muted small">Subtotal {{ bank_name }}:</td>
<td class="fw-bold small">R$ {{ info.total_banco|floatformat:2 }}</td>
</tr>
{% empty %}
<tr>
<td colspan="3" class="text-center py-4">Sem lançamentos para este mês.</td>
</tr>
{% endfor %}
</tbody>
<tfoot class="table-dark">
<tr>
<td colspan="2" class=" align-middle">TOTAL GERAL DOS BANCOS</td>
<td class="fs-5">R$ {{ total_expense.total_geral|floatformat:2 }}</td>
</tr>
</tfoot>
</table>
</div>
</div>

View File

@@ -0,0 +1,22 @@
<h3> Despesas Prof </h3>
<table class="table">
<thead>
<tr>
<th>Banco</th>
<th>Total</th>
</tr>
</thead>
<tbody>
{% for name, value in total_expense_prof.sum_total.items %}
<tr class="table table-striped" >
<td>{{ name }}</td>
<td>R$ {{ value|floatformat:2 }}</td>
</tr>
{% empty %}
<tr>
<td colspan="2"> Vazio. </td>
</tr>
{% endfor %}
</tbody>
</table>
Todos os bancos R$ {{ total_expense_prof.sum_all |floatformat:2 }}

View File

@@ -0,0 +1,56 @@
<div class="card shadow-sm border-0 mb-4">
<div class="card-header py-3 d-flex justify-content-between align-items-center">
<h3 class="h5 mb-0 text-primary">
<i class="bi bi-person-check-fill me-2"></i>Resumo de Atendimentos
</h3>
<span class="badge rounded-pill bg-primary px-3">Mês Atual</span>
</div>
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<thead class="table text-secondary">
<tr>
<th class="ps-4">Profissional</th>
<th>Serviço</th>
<th class="text-center">Qtd. Realizada</th>
<th class="text-end pe-4">Lucro Líquido</th>
</tr>
</thead>
<tbody>
{% for item in total_firm.services %}
<tr>
<td class="ps-4">
<span class="fw-bold ">{{ item.professional__name }}</span>
</td>
<td>
<span class="text-muted">{{ item.service__name }}</span>
</td>
<td class="text-center">
<span class="badge bg-light text-dark border">{{ item.quantidade_feitas }}</span>
</td>
<td class="text-end pe-4 fw-semibold text-success">
R$ {{ item.lucro_liquido|floatformat:2 }}
</td>
</tr>
{% empty %}
<tr>
<td colspan="4" class="text-center py-5 text-muted">
<p class="mb-0">Nenhum atendimento registrado até o momento.</p>
</td>
</tr>
{% endfor %}
</tbody>
{% if total_firm.services %}
<tfoot class="table-group-divider">
<tr class="bg-light">
<td colspan="3" class="fw-bold py-3">Total Geral da Firma:</td>
<td class="text-end pe-4 fw-bold text-primary h4 mb-0">
R$ {{ total_firm.total|floatformat:2 }}
</td>
</tr>
</tfoot>
{% endif %}
</table>
</div>
</div>

View File

@@ -0,0 +1,22 @@
<h3> Prof. </h3>
<table class="table">
<thead>
<tr>
<th>Prof.</th>
<th>Total</th>
</tr>
</thead>
<tbody>
{% for name, value in total_prof.sum_total.items %}
<tr class="table table-striped" >
<td>{{ name }}</td>
<td>R$ {{ value|floatformat:2 }}</td>
</tr>
{% empty %}
<tr>
<td colspan="2"> Vazio. </td>
</tr>
{% endfor %}
</tbody>
</table>
Todos os Prof. R$ {{ total_prof.sum_all |floatformat:2 }}

View File

@@ -0,0 +1,27 @@
<div class="col-12">
<form method="get" action="{% url 'DashboardProf' %}" id="Form"
class="d-flex flex-wrap gap-3">
{% for Prof in Professionals %}
<input type="radio"
class="btn-check"
name="Prof"
id="prof_{{ Prof.id }}"
value="{{ Prof.id }}"
{% if request.GET.Prof == Prof.id|stringformat:"i" %}checked{% endif %}
onchange="this.form.submit();">
<label class="btn btn-outline-primary fw-semibold fs-5 shadow-sm rounded-pill"
for="prof_{{ Prof.id }}">
{{ Prof.name }} {{ Prof.symbol }}
</label>
{% endfor %}
</form>
</div>
<br>
<br>
<br>

View File

@@ -0,0 +1,61 @@
<div class="col-4">
<div class="card shadow-sm">
<div class="card-header">
<h3 class="h5 mb-0">Relatório de Entradas</h3>
</div>
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<thead class="table">
<tr>
<th scope="col" class="ps-4">Descrição / Data</th>
<th scope="col" class="text-end pe-4">Valor (R$)</th>
</tr>
</thead>
<tbody>
{% for nome_servico, dados in Credit.sum_credit.items %}
{# Verifica se a soma do serviço é maior que zero #}
{% if dados.sum_credit > 0 %}
<tr class="table border-bottom">
<td class="ps-4">
<div class="fw-bold">{{ nome_servico }}</div>
</td>
<td class="text-end pe-4">
<span class="badge bg-primary rounded-pill fs-6">
R$ {{ dados.sum_credit|floatformat:2 }}
</span>
</td>
</tr>
{% for detalhe in dados.list_credit %}
{# Verifica se o valor individual é maior que zero #}
{% if detalhe.gross_value > 0 %}
<tr class="border-0">
<td class="ps-5">
<i class="bi bi-arrow-return-right me-2"></i> {{ detalhe.date|date:"d/m/Y" }}
</td>
<td class="text-end pe-4">
{{ detalhe.gross_value|floatformat:2 }}
</td>
</tr>
{% endif %}
{% endfor %}
{% endif %}
{% empty %}
<tr>
<td colspan="2" class="text-center py-4 text-muted">
Nenhum serviço realizado neste mês.
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="card-footer d-flex justify-content-between align-items-center">
<div class="h4 mb-0">Total</div>
<span class="badge bg-primary rounded-pill fs-6">
<div class="h4 mb-0 ">R$ {{ Credit.sum_credit_all|floatformat:2 }}</div>
</span>
</div>
</div>
</div>

View File

@@ -0,0 +1,61 @@
<div class="col-4">
<div class="card shadow-sm">
<div class="card-header">
<h3 class="h5 mb-0">Relatório de Saídas</h3>
</div>
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<thead class="table">
<tr>
<th scope="col" class="ps-4">Descrição / Data</th>
<th scope="col" class="text-end pe-4">Valor (R$)</th>
</tr>
</thead>
<tbody>
{% for nome_servico, dados in Expense.sum_expense.items %}
{# Verifica se a soma do serviço é maior que zero #}
{% if dados.sum_expense > 0 %}
<tr class="table border-bottom">
<td class="ps-4">
<div class="fw-bold">{{ nome_servico }}</div>
</td>
<td class="text-end pe-4">
<span class="badge bg-primary rounded-pill fs-6">
R$ {{ dados.sum_expense|floatformat:2 }}
</span>
</td>
</tr>
{% for detalhe in dados.list_expense %}
{# Verifica se o valor individual é maior que zero #}
{% if detalhe.gross_value > 0 %}
<tr class="border-0">
<td class="ps-5">
<i class="bi bi-arrow-return-right me-2"></i> {{ detalhe.date|date:"d/m/Y" }}
</td>
<td class="text-end pe-4">
{{ detalhe.gross_value|floatformat:2 }}
</td>
</tr>
{% endif %}
{% endfor %}
{% endif %}
{% empty %}
<tr>
<td colspan="2" class="text-center py-4 text-muted">
Nenhum serviço realizado neste mês.
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="card-footer d-flex justify-content-between align-items-center">
<div class="h4 mb-0">Total</div>
<span class="badge bg-primary rounded-pill fs-6">
<div class="h4 mb-0 ">R$ {{ Expense.sum_expense_all|floatformat:2 }}</div>
</span>
</div>
</div>
</div>

View File

@@ -0,0 +1,38 @@
<div class="col-4">
<div class="card shadow-sm mb-4">
<div class="card-header ">
<h3 class="card-title h5 mb-0">Serviços Realizados</h3>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover table-striped mb-0">
<thead class="table">
<tr>
<th scope="col" class="ps-4">Serviço</th>
<th scope="col" class="text-center">Quantidade</th>
</tr>
</thead>
<tbody>
{% for item in Total_serv.services %}
<tr>
<td class="ps-4">{{ item.service__name }}</td>
<td class="text-center">
<span class="badge bg-secondary rounded-pill">
{{ item.total_performed }}
</span>
</td>
</tr>
{% empty %}
<tr>
<td colspan="2" class="text-center py-4 text-muted">
<i class="bi bi-info-circle me-2"></i>
Nenhum serviço realizado neste mês.
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,24 @@
{% extends "BaseLogin.html" %}
{% block title %} Dashboard Prof {% endblock %}
{% block content %}
<div class="row">
{% include 'Dashboards/DashboardProf/List_prof.html' %}
<hr>
<div class="resumo">
<h3>Resumo do Mês</h3>
<p>
<strong>Total Ganho a Receber: R$ </strong>
<span class="fs-4 fw-bold">
{{ Money|floatformat:2 }}
</span>
</p>
</div>
<hr>
{% include 'Dashboards/DashboardProf/Resumo do Mês.html' %}
{% include 'Dashboards/DashboardProf/Relatório de Saídas.html' %}
{% include 'Dashboards/DashboardProf/Relatório de Entradas.html' %}
</div>
{% endblock %}