{% extends 'base.html.twig' %} {% block title %}Dashboard - CxP GT{% endblock %} {% block page_title %}Dashboard{% endblock %} {% block body %} {% set currentUser = app.user %} {% set userInitials = currentUser ? currentUser.nombre|slice(0, 2)|upper : 'US' %} {% set roleName = currentUser ? get_user_role_name(currentUser) : 'Usuario' %} {% set userPhoto = currentUser and currentUser.foto ? '/' ~ currentUser.foto|trim('/') : null %} {% set themeMap = { 'slate': { 'shell': 'from-slate-950 via-slate-900 to-slate-800', 'badge': 'bg-white/10 text-slate-100', 'accent': 'text-slate-100', 'icon': 'bg-white/10 text-white' }, 'amber': { 'shell': 'from-amber-500 via-orange-500 to-amber-600', 'badge': 'bg-white/20 text-amber-50', 'accent': 'text-amber-50', 'icon': 'bg-white/15 text-white' }, 'emerald': { 'shell': 'from-emerald-500 via-teal-500 to-emerald-600', 'badge': 'bg-white/20 text-emerald-50', 'accent': 'text-emerald-50', 'icon': 'bg-white/15 text-white' }, 'rose': { 'shell': 'from-fuchsia-500 via-rose-500 to-pink-600', 'badge': 'bg-white/20 text-rose-50', 'accent': 'text-rose-50', 'icon': 'bg-white/15 text-white' } } %}
{% if userPhoto %} {{ currentUser ? currentUser.nombre : 'Usuario' }} {% else %}
{{ userInitials }}
{% endif %}

Panel principal

¡Bienvenido de nuevo, {{ currentUser ? currentUser.nombre : 'usuario' }}!

Aquí está un resumen actualizado de tu sistema de cuentas por pagar. Usa las tarjetas para ir directo al filtro que necesites.

{{ roleName }}
{% for metric in metrics %} {% set palette = themeMap[metric.theme] %}
{% if loop.index == 1 %} {% elseif loop.index == 2 %} {% elseif loop.index == 3 %} {% else %} {% endif %}
Abrir filtro

{{ metric.label }}

{% if loop.index in [2, 3, 4] %} {{ currencySymbol }} {{ metric.value|number_format(2, '.', ',') }} {% else %} {{ metric.value|number_format(0, '.', ',') }} {% endif %}

{{ metric.hint }}

{% endfor %}

Radar de vencimientos

Proyección de vencimientos

Visualiza la carga diaria del rango seleccionado y entra rápido al detalle de cada fecha.

{% for option in rangeOptions %} {{ option }}d {% endfor %}
{% if projectionStats.total <= 0 and overdueSummary.count > 0 %}

No hay vencimientos próximos entre {{ projectionWindow.from }} y {{ projectionWindow.to }}.

Sí tienes {{ overdueSummary.count }} documentos vencidos por {{ currencySymbol }} {{ overdueSummary.amount|number_format(2, '.', ',') }}, con fechas del {{ overdueSummary.oldestLabel }} al {{ overdueSummary.latestLabel }}.

Ver vencidos
{% endif %}

Total proyectado

{{ currencySymbol }} {{ projectionStats.total|number_format(2, '.', ',') }}

Monto acumulado dentro del rango activo.

Pico diario

{{ currencySymbol }} {{ projectionStats.peak|number_format(2, '.', ',') }}

Punto más alto esperado en el calendario.

Promedio

{{ currencySymbol }} {{ projectionStats.average|number_format(2, '.', ',') }}

Media de salida estimada por día.

Fecha Comportamiento Monto Acción
{% for row in projectionHighlights %} {% set percent = projectionStats.peak > 0 ? ((row.total / projectionStats.peak) * 100)|round(0, 'floor') : 0 %}

{{ row.label }}

{{ row.date }}

{{ currencySymbol }} {{ row.total|number_format(2, '.', ',') }}
{% else %}
No hay vencimientos pendientes en el rango seleccionado.
{% endfor %}

Seguimiento documental

Documentos recientes

Una vista rápida de los últimos documentos ingresados al sistema.

Ver cartera completa
{% for doc in recentDocuments %} {% else %} {% endfor %}
Documento Proveedor Tipo Fecha Total Saldo Estado Acción
{{ doc.documento }} {{ doc.proveedor }} {{ doc.tipo }} {{ doc.fecha }} {{ doc.total }} {{ doc.saldo }} {% if doc.estado == 'Pagado' %} {{ doc.estado }} {% elseif doc.estado == 'Parcial' %} {{ doc.estado }} {% elseif doc.estado == 'Pendiente retención' %} {{ doc.estado }} {% elseif doc.estado == 'Anulado' %} {{ doc.estado }} {% else %} {{ doc.estado }} {% endif %} Ver
No hay documentos recientes.
{% endblock %}