{% extends "base.html" %} {% block title %}Historial{% endblock %} {% block header %}Historial de Envíos{% endblock %} {% block content %} {% if stats %}
{% for s in stats %}
{{ s.tipo }} {{ s.cnt }} {{ 'enviados' if s.status == 'success' else ('ya existe' if s.status == 'warning' else 'errores') }}
{% endfor %}
{{ total }} total
{% endif %}
{% if total %} Mostrando {{ offset + 1 }}–{{ [offset + page_size, total]|min }} de {{ total }} {% else %}Sin resultados{% endif %}
{% if envios %}
{% for e in envios %} {% endfor %}
# Tipo Factura IDRECEP. Contrato Estado Mensaje TNS Fecha Usuario
{{ e.id }} {{ e.tipo }} {{ e.factura or '-' }} {{ e.idrecepcion or '-' }} {{ e.contrato or '-' }} {% if e.status == 'success' %} ✓ Enviado {% elif e.status == 'warning' %} ! Ya existe {% else %} ✗ Error {% endif %} {% if e.mensaje_tns %} {{ e.mensaje_tns[:55] }}{% if e.mensaje_tns|length > 55 %}…{% endif %} {% else %}{% endif %} {{ e.created_at[:16] if e.created_at else '-' }} {{ e.username or '-' }} {% if e.status == 'error' and e.json_enviado %} {% endif %}
{% if offset > 0 %} Anterior {% endif %} {% if has_more %} Siguiente {% endif %}
Pág. {{ (offset // page_size) + 1 }}
{% else %}

Sin registros con los filtros seleccionados

Quitar filtros
{% endif %}
{% endblock %}