{% extends "base_authenticated.html" %} {% block title %}Attendance Report - QR Code Management{% endblock %} {% block extra_head %} {% endblock %} {% block content %}

Attendance Report

Monitor and analyze staff attendance with enhanced location tracking

{% if session.role in ['admin', 'payroll'] %} {% endif %} {% if session.role in ['admin', 'accounting'] %} {% endif %}

Filter Records

Attendance Records {% if date_from or date_to or location_filter or employee_filter or project_filter %} (Filtered) {% endif %}

entries
{% if attendance_records %} {% for record in attendance_records %} {% endfor %}
# Employee ID Employee Name Location Event Date Time QR Address Check-in Address {% if has_location_accuracy_feature %}Location Accuracy{% else %}GPS Accuracy{% endif %} Device Actions
{{ loop.index }}
{{ record.employee_id }}
{{ record.employee_name if record.employee_name else 'Unknown' }}
{{ record.location_name }}
{{ record.location_event }}
{{ record.check_in_date.strftime('%m/%d/%Y') }}
{% if record.check_in_time %} {% set check_in_time = record.check_in_time %} {% if check_in_time is string %} {{ check_in_time }} {% else %} {% if check_in_time.strftime is defined %} {{ check_in_time.strftime('%H:%M') }} {% elif check_in_time.total_seconds is defined %} {% set total_seconds = check_in_time.total_seconds() | int %} {% set hours = (total_seconds // 3600) % 24 %} {% set minutes = (total_seconds % 3600) // 60 %} {{ "%02d:%02d"|format(hours, minutes) }} {% else %} {{ check_in_time }} {% endif %} {% endif %} {% else %} N/A {% endif %}
{% if record.qr_address %} {{ record.qr_address[:50] }}{{ '...' if record.qr_address|length > 50 else '' }} {% else %} N/A {% endif %}
{{ (record.checked_in_address or 'N/A')[:50] }}{% if (record.checked_in_address or '')|length > 50 %}...{% endif %}
{% if record.verification_required and record.verification_status == 'pending' %} {% elif record.verification_status == 'approved' %}
Verified ({{ '%.3f'|format(record.location_accuracy) }} mi)
{% elif record.verification_status == 'rejected' %}
Rejected ({{ '%.3f'|format(record.location_accuracy) }} mi)
{% elif has_location_accuracy_feature and record.location_accuracy %}
{{ "%.3f"|format(record.location_accuracy) }} mi ({{ record.accuracy_level }})
{% elif record.gps_accuracy %}
{{ "%.1f"|format(record.gps_accuracy) }}m (gps)
{% else %}
Unknown
{% endif %}
{{ record.device_info[:20] }}{% if record.device_info|length > 20 %}...{% endif %}
{% if record.verification_required and record.verification_status == 'pending' %} {% endif %} {% if session.role in ['admin', 'payroll', 'accounting'] %} {% else %} {% endif %}
{% else %}

No Attendance Records Found

{% if date_from or date_to or location_filter or employee_filter %} No records match your current filters. Try adjusting the filter criteria. {% else %} No staff have checked in yet. QR codes need to be scanned to generate attendance data. {% endif %}

{% if date_from or date_to or location_filter or employee_filter or project_filter %} {% endif %}
{% endif %}
{% if attendance_records %}
{% endif %}
{% endblock %} {% block extra_scripts %} {% endblock %}