{# templates/reports/expiry_report.html #} {% extends "pos/base.html" %} {% load static %} {% block title %}Expiry Report{% endblock %} {% block heading %}Expiry Report{% endblock %} {% block stylesheets %} {% endblock %} {% block content %} {# ── Filter form ──────────────────────────────────────────────────────────── #}
{# Company #}
{# Category #}
{# Days to Expiry #}
{# Status #}
{# Show Zero Stock #}
{# row #} {# ── Grouping & Actions row ── #}
Group By
{# Excel #} Excel {# PDF — orientation modal #}
{# row #}
{# card-body #}
{# card #}
{# ── Summary pills ───────────────────────────────────────────────────────── #}
Total: {{ summary.total }} Expired: {{ summary.expired }} Short (≤{{ short_threshold }}d): {{ summary.short }} OK: {{ summary.ok }}
{# ── Data Table ───────────────────────────────────────────────────────────── #}
{% for col in columns %} {% endfor %} {% if render_rows %} {% for r in render_rows %} {% if r.is_group_header %} {% else %} {% for cell in r.cells %} {% endfor %} {% endif %} {% endfor %} {% else %} {% endif %} {% for cell in totals_render %} {% endfor %}
{{ col.label }}
► {{ r.group_label }}
{# Status column: render badge #} {% if forloop.counter == 9 %} {% if cell.value == 'Expired' %} {{ cell.value }} {% elif cell.value == 'Short' %} {{ cell.value }} {% else %} {{ cell.value }} {% endif %} {% else %} {% if 'text-end' in cell.class %} {{ cell.value|floatformat:2 }} {% else %} {{ cell.value }} {% endif %} {% endif %}
No batch/expiry data found for the selected filters.
{% if 'text-end' in cell.class %} {{ cell.value|floatformat:2 }} {% else %} {{ cell.value }} {% endif %}
{# table-responsive #}
{# ── PDF Orientation Modal ────────────────────────────────────────────────── #} {% endblock %} {% block javascripts %} {% endblock %}