{% extends "base.html" %} {% block titulo %}Historial de Documentos{% endblock %} {% block encabezado %}Historial de Documentos{% endblock %} {% block contenido %}
Cotizaciones Órdenes de Trabajo {% if puede_oc %} Órdenes de Compra {% endif %}
{{ total }} registro(s)
{% for f in filas %} {% if tipo == 'oc' %} {% set num, fecha, hora, creador, nombre, total, pdf_path, estado = f %} {% set tel, correo = '', '' %} {% else %} {% set num, fecha, hora, creador, nombre, total, pdf_path, tel, estado, correo = f %} {% endif %} {% else %} {% endfor %}
Fecha{{ 'Proveedor' if tipo=='oc' else 'Cliente' }} Creado porTotalEstadoAcciones
{{ '%03d'|format(num) }} {{ fecha }} {{ hora }} {{ nombre or 'Sin nombre' }} {{ creador }} ${{ fmt(total) }} {% set editable = es_admin or (tipo=='oc' and puede_oc) or (tipo=='ot' and puede_caja) or tipo=='cot' %} {% if editable %}
{% else %}{{ estado }}{% endif %}
{% if pdf_path %} PDF {% endif %} {% if tipo != 'oc' %} {% set cel = tel_valido(tel) %} {% if cel %} WhatsApp {% endif %} {% if correo and '@' in correo %} Correo {% endif %} {% endif %} {% if tipo=='cot' and estado=='Aprobada' %} → OT {% endif %} {% if es_admin or (tipo=='oc' and puede_oc) %} Editar
{% endif %}
Sin documentos.
{% if max_pag > 1 %}
{% if pagina > 1 %}‹ Anterior{% endif %} Página {{ pagina }} de {{ max_pag }} {% if pagina < max_pag %}Siguiente ›{% endif %}
{% endif %} {% endblock %}