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

Attendance Source Debug

Configured priority
[{{ priority_list | join(', ') }}]
{% if debug_info %}
Debug for {{ debug_info.employee.full_name }} – {{ debug_info.date.strftime('%d-%m-%Y') }}
Final attendance row
{% if debug_info.attendance %}
Check-in{{ debug_info.attendance.check_in_time or '-' }}
Check-out{{ debug_info.attendance.check_out_time or '-' }}
Hours{{ debug_info.attendance.working_hours or '-' }}
Remarks{{ debug_info.attendance.remarks or '-' }}
Source{{ debug_info.chosen_source or 'N/A' }}
{% else %}

No Attendance row exists for this day.

{% endif %}
Source details (by type)

Manual – {% if debug_info.sources.manual.has_data %} Has data {% else %} No data {% endif %}

Biometric – {% if debug_info.sources.biometric.has_data %} {{ debug_info.sources.biometric.punches|length }} punch(es) {% else %} No data {% endif %}

{% if debug_info.sources.biometric.punches %} {% for p in debug_info.sources.biometric.punches %} {% endfor %}
TimeDirectionDevice
{{ p.punch_time.strftime('%H:%M:%S') }} {{ p.direction|upper }} {{ p.device_code or '-' }}
{% endif %}

Self Punch – {% if debug_info.sources.self.has_data %} {{ debug_info.sources.self.punches|length }} punch(es) {% else %} No data {% endif %}

{% if debug_info.sources.self.punches %} {% for p in debug_info.sources.self.punches %} {% endfor %}
TimeDirectionLocation
{{ p.punch_time.strftime('%H:%M:%S') }} {{ p.direction|upper }} {% if p.latitude and p.longitude %} {{ "%.5f"|format(p.latitude) }}, {{ "%.5f"|format(p.longitude) }} {% else %} Not captured {% endif %}
{% endif %}

Desktime – {% if debug_info.sources.desktime.has_data %} Has log {% else %} No data {% endif %}

{% if debug_info.sources.desktime.log %} {% set log = debug_info.sources.desktime.log %}
Arrived{{ log.arrived or '-' }}
Left{{ log.left or '-' }}
Productive hours{{ (log.productive_hours or 0)|round(2) }}
{% endif %}
{% endif %}
{% endblock %}