{% extends "expenses/base.html" %} {% load l10n %} {% block title %}Dashboard{% endblock %} {% block content %}

{% if selected_account_obj %} {{ selected_account_obj.name }} {% else %} Todas las cuentas {% endif %}

{% if selected_month %} {{ selected_month }}/{{ selected_year}} {% else %} Año {{ selected_year }} {% endif %}

Este mes Mes anterior Este año {% if period %} ❌ Quitar filtros temporales {% endif %}

{% if period %} {% endif %} {% if not period %} {% endif %}
Saldo actual {{ kpi_balance|floatformat:2 }}€
Gastos totales {{ kpi_total|floatformat:2 }}€
Nº de gastos {{ kpi_count }}
Categorías {{ kpi_categories }}
{% if compare_enabled %}

📊 Resumen comparativo

Gastos periodo actual: {{ kpi_total|floatformat:2 }} €
Gastos periodo anterior: {{ kpi_previous_total|floatformat:2 }} €
Diferencia: {% if kpi_trend == "up" %}+{% endif %}{{ kpi_difference|floatformat:2 }}€ ({{ kpi_percentage|floatformat:1 }}%) {% if kpi_trend == "up" %}⚠️ Has gastado más que el periodo pasado. {% else %} ¡Bien! Has reducido tus gastos. {% endif %}

{% endif %}

Evolución de Gastos ({% if chart_type == 'day' %}Por día {% else %} Por Meses{% endif %})

Distribución por Categorías

Evolución anual por cuenta ({{ selected_year }})

{% for acc in accounts_charts %}

{{ acc.name }}

Saldo actual: {{ acc.current_balance|floatformat:2 }}€

{% endfor %}
{% if compare_enabled %}

Comparativa

Diferencia: {% if kpi_trend == "up" %}+{% endif %} {{ kpi_difference_abs|floatformat:2 }} € {% if kpi_percentage %} ({{ kpi_percentage|floatformat:1 }}%) {% endif %}

{% endif %}

Objetivos

{% if goals %}
{% for goal in goals %}
{{ goal.name }}
{{ goal.progress|floatformat:1 }}€ / {{ goal.target_amount|floatformat:1 }}€ ({{ goal.percentage|floatformat:1 }}%)
{% endfor %}
{% else %}

No hay objetivos.

{% endif %} {% for row in by_category %} {% endfor %}
Categoría Total
{{ row.category__name }} {{ row.total|floatformat:2 }} €
{% endblock %}