{% extends "base.html" %} {% block contenido %} {% set acceso = permisos(modulo=id_modulo("imports"), usuario=usuario.id) %}
{%- if TESTING -%}
{%- endif -%}

{{ _("Lotes de Importación") }}

{% if acceso.crear %} {{ _("Nueva Importación") }} {% endif %}
{% if batches %}

{{ _("Listado operativo de lotes de importación con su estado, avance y acciones disponibles.") }}

{% for batch in batches %} {% endfor %}
{{ _("Listado de lotes de importación") }}
ID {{ _("Tipo") }} {{ _("Estado") }} {{ _("Fecha") }} {{ _("Progreso") }} {{ _("Acciones") }}
{{ batch.id }} {{ batch.record_type }}
{{ batch.company.company_name }}
{% if batch.import_status == 0 %} {{ _("No iniciado") }} {% elif batch.import_status == 1 %} {{ _("Archivo cargado") }} {% elif batch.import_status == 2 %} {{ _("Validado con errores") }} {% elif batch.import_status == 3 %} {{ _("Listo para importar") }} {% elif batch.import_status == 4 %} {{ _("Procesando") }} {% elif batch.import_status == 5 %} {{ _("Completado") }} {% elif batch.import_status == 6 %} {{ _("Completado con errores") }} {% elif batch.import_status == 7 %} {{ _("Fallido") }} {% elif batch.import_status == 8 %} {{ _("Cancelado") }} {% endif %} {{ batch.created.strftime('%Y-%m-%d %H:%M') }} {% if batch.import_status == 4 %} {% set progress = ((batch.processed_rows or 0) * 100 / batch.total_rows) if batch.total_rows else 0 %}
{{ batch.processed_rows }} / {{ batch.total_rows }} {% else %} {{ batch.success_rows }} / {{ batch.total_rows }} {% endif %}
{{ _("Ver") }}
{% else %}
{{ _("No hay lotes de importación") }}

{{ _("Cree un lote para cargar plantillas CSV, XLSX, XLS u ODS.") }}

{% if acceso.crear %} {{ _("Nueva Importación") }} {% endif %}
{% endif %}
{% endblock %}