{% extends reportShell|default('base.html.twig') %} {% block title %}{{ 'report.aging'|trans }}{% endblock %} {% block page_title %}{{ 'report.aging'|trans }}{% endblock %} {% block stylesheets %} {% if reportShell|default('base.html.twig') == 'base.html.twig' %}{{ parent() }}{% endif %} {% endblock %} {% block breadcrumb %} {% endblock %} {% block report_title %}{{ 'report.aging'|trans }}{% endblock %} {% block report_subtitle %}Al {{ filtros.fechas.hasta|date('d/m/Y') }}{% endblock %} {% block content %} {% set isExportView = reportShell|default('base.html.twig') != 'base.html.twig' %} {% set exportQuery = {'hasta': filtros.fechas.hasta} %} {% if filtros.proveedor_id %}{% set exportQuery = exportQuery|merge({'proveedor_id': filtros.proveedor_id}) %}{% endif %}
{% if not isExportView %} {% endif %}
{% if not isExportView %}

{{ 'report.filters'|trans }}

Ajusta el proveedor o la fecha de corte y actualiza los resultados.

{% endif %}
{% if isExportView %} Excel Excel datos PDF Imprimir {% else %} {% include 'reporte/_export_menu.html.twig' with {id: 'aging-export-menu', routeName: 'rep_antiguedad', exportQuery: exportQuery} only %} {% endif %}
{% for metric in [ {label: 'Documentos', value: stats.documentos_total|default(0)}, {label: 'Documentos vencidos', value: stats.documentos_vencidos|default(0)}, {label: 'Saldo corriente', value: stats.total_corriente|default(0)|number_format(2, '.', ',')}, {label: 'Saldo vencido', value: stats.total_vencido|default(0)|number_format(2, '.', ',')} ] %}
{{ metric.label }} {{ metric.value }}
{% endfor %}
{% if not isExportView and reporte|length > 0 %}

Totales generales

Saldo consolidado y distribución por antigüedad.

{{ grandTotal.total|number_format(2, '.', ',') }}
{% for total in [ {label: 'Corriente', value: grandTotal.corriente}, {label: '1 a 30', value: grandTotal.d01_30}, {label: '31 a 60', value: grandTotal.d31_60}, {label: '61 a 90', value: grandTotal.d61_90}, {label: '91 o más', value: grandTotal.d91_mas} ] %}
{{ total.label }}
{{ total.value|number_format(2, '.', ',') }}
{% endfor %}
{% endif %} {% if not isExportView %}
{% for grupo in reporte %}
{{ grupo.proveedor }} {{ grupo.moneda }} · {{ grupo.documentos|length }} documentos {{ grupo.subtotal.total|number_format(2, '.', ',') }}
{% for subtotal in [ {label: 'Corriente', value: grupo.subtotal.corriente}, {label: '1 a 30', value: grupo.subtotal.d01_30}, {label: '31 a 60', value: grupo.subtotal.d31_60}, {label: '61 a 90', value: grupo.subtotal.d61_90}, {label: '91 o más', value: grupo.subtotal.d91_mas} ] %}
{{ subtotal.label }}
{{ subtotal.value|number_format(2, '.', ',') }}
{% endfor %}
{% else %}

No hay saldos pendientes

No se encontraron saldos para la fecha y proveedor seleccionados.

{% endfor %}
{% endif %}
{% endblock %} {% block report_body %} {% set isExportView = reportShell|default('base.html.twig') != 'base.html.twig' %}
{% if reporte|length > 0 %} {% for grupo in reporte %} {% for doc in grupo.documentos %} {% endfor %} {% endfor %} {% else %} {% endif %} {% if reporte|length > 0 %} {% endif %}
Antigüedad de saldos por proveedor y documento
Proveedor / Moneda Referencia Documento F. emisión F. vencimiento Saldo Corriente 1 a 30 31 a 60 61 a 90 91 o más
{{ grupo.proveedor }} | {{ grupo.moneda }}
{{ grupo.proveedor }} {{ doc.referencia }} {{ doc.documento }} {{ doc.f_aplicacion }} {{ doc.f_vencimiento }} {{ doc.saldo|number_format(2, '.', ',') }} {{ doc.corriente > 0 ? doc.corriente|number_format(2, '.', ',') : '-' }} {{ doc.d01_30 > 0 ? doc.d01_30|number_format(2, '.', ',') : '-' }} {{ doc.d31_60 > 0 ? doc.d31_60|number_format(2, '.', ',') : '-' }} {{ doc.d61_90 > 0 ? doc.d61_90|number_format(2, '.', ',') : '-' }} {{ doc.d91_mas > 0 ? doc.d91_mas|number_format(2, '.', ',') : '-' }}
Subtotal {{ grupo.proveedor }} | {{ grupo.moneda }} {{ grupo.subtotal.total|number_format(2, '.', ',') }} {{ grupo.subtotal.corriente|number_format(2, '.', ',') }} {{ grupo.subtotal.d01_30|number_format(2, '.', ',') }} {{ grupo.subtotal.d31_60|number_format(2, '.', ',') }} {{ grupo.subtotal.d61_90|number_format(2, '.', ',') }} {{ grupo.subtotal.d91_mas|number_format(2, '.', ',') }}
No hay saldos pendientes a la fecha seleccionada.
Total general {{ grandTotal.total|number_format(2, '.', ',') }} {{ grandTotal.corriente|number_format(2, '.', ',') }} {{ grandTotal.d01_30|number_format(2, '.', ',') }} {{ grandTotal.d31_60|number_format(2, '.', ',') }} {{ grandTotal.d61_90|number_format(2, '.', ',') }} {{ grandTotal.d91_mas|number_format(2, '.', ',') }}
{% endblock %}