{% extends "base.html" %} {% block content %}

Self Punch History – {{ '%02d'|format(month) }}/{{ year }}

{% for row in history_rows %} {% endfor %}
Date First IN Last OUT Hours All punches
{{ row.date.strftime('%d-%m-%Y') }} {% if row.check_in %}{{ row.check_in.strftime('%H:%M') }}{% else %}-{% endif %} {% if row.check_out %}{{ row.check_out.strftime('%H:%M') }}{% else %}-{% endif %} {% if row.total_hours is not none %} {{ "%.2f"|format(row.total_hours) }} {% else %}-{% endif %} {% if row.punches %} {% for p in row.punches %} {% set is_self = (p.source_name == 'self') %} {% set st = (p.approval_status or 'pending') if is_self else 'device' %} {{ p.direction|upper }} {{ p.punch_time.strftime('%H:%M') }} {% if is_self %} {% if st == 'approved' %} A {% elif st == 'rejected' %} R {% else %} P {% endif %} {% endif %} {% endfor %} {% else %} No punches {% endif %}
← Back to punch page
{% endblock %}