{% extends "base.html" %} {% block title %}Reports{% endblock %} {% block body %}
{% with messages = get_flashed_messages(with_categories=true) %} {% for cat, msg in messages %}
{{ msg }}
{% endfor %} {% endwith %}

πŸ” Generate Report

{% if role in ('admin', 'principal') %}
{% endif %}
⬇ Excel
πŸ“„ PDF
{% if role in ('principal','admin') and rtype in ('weekly','monthly') and not cls %}
⚠️ For Weekly/Monthly report It is necessary to select a class and section..
{% endif %}
{% set pivot_needs_class = role in ('principal','admin') and rtype in ('weekly','monthly') and not cls %} {% if pivot_needs_class %}
⚠️ For the Weekly/Monthly report Please select Class first..
{% elif summary_mode and rows %}

Class: {{ cls }} | Section: {{ section }}

{{ rtype|title }} Report ({{ start_str }} – {{ end_str }})

πŸ“… {{ date_label }}
{% for r in rows %} {% endfor %}
Date T P A L H
{{ r["date"] }} {{ r["T"] }} {{ r["P"] }} {{ r["A"] }} {{ r["L"] }} {{ r["H"] }}
πŸ“Œ Shortcut used in Report file:
P = Present L = Late A = Absent H = Half-Day SW = Special Work SX = Work Exit EX = Early Exit
{% elif rows %}

πŸ“‹ {{ rtype|title }} Report β€” {{ rows|length }} records {% if cls %} β€” Class {{ cls }}{% endif %} {% if section %} ({{ section }}){% endif %}

πŸ“… {{ date_label }}
{% for i, row in enumerate(rows, 1) %} {% set st = (row["status"] or "Absent") %} {% set _ds = ((row["roll_no"]|string if row["roll_no"] else "") ~ " " ~ (row["name"] or "") ~ " " ~ (row["class"]|string if row["class"] else "") ~ " " ~ (row["section"] or "") ~ " " ~ (row["date"] or "") ~ " " ~ st ~ " " ~ (row["remark"] or ""))|lower %} {% endfor %}
# Roll Name Class Sec Date Time In Time Out Status Remark
{{ i }} {{ row["roll_no"] or '–' }} {{ row["name"] }} {{ row["class"] }} {{ row["section"] or '–' }} {{ row["date"] }} {{ row["time_in"] or '–' }} {{ row["time_out"] or '–' }} {{ st }} {{ row["remark"] or '' }}
πŸ“Œ Shortcut used in Report file:
P = Present L = Late A = Absent H = Half-Day SW = Special Work SX = Work Exit EX = Early Exit
{% elif request.args %}
πŸ“­ No records found for the selected filter.
{% endif %}
{% endblock %}