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

Employee Attendance

Record Attendance

{% if not employees %}
⚠️
No Employees Available
You need to add employees first before you can record attendance.
👥 Go to Employees ➕ Add First Employee
{% endif %}
{{ form.hidden_tag() }}
{% if employees %} {{ form.employee_id() }} {% else %} {% endif %}
{{ form.date(type='date') }}
{{ form.check_in(type='datetime-local') }} Optional - when employee started work
{{ form.check_out(type='datetime-local') }} Optional - when employee finished work
{{ form.status() }}
{{ form.note(placeholder='Any additional notes...') }}
{{ form.submit(class_='btn-primary') }}

Current Month Attendance

{% if attendances %}
{% for attendance in attendances %} {% endfor %}
Date Employee Check In Check Out Working Hours Status Note
{{ attendance.date|date_format }} {{ attendance.employee.full_name }}
{{ attendance.employee.employee_id }}
{% if attendance.check_in %} {{ attendance.check_in.strftime('%H:%M') }} {% else %} - {% endif %} {% if attendance.check_out %} {{ attendance.check_out.strftime('%H:%M') }} {% else %} - {% endif %} {% if attendance.working_hours > 0 %} {{ "%.1f"|format(attendance.working_hours) }} hrs {% else %} - {% endif %} {% if attendance.status == 'present' %} ✅ Present {% elif attendance.status == 'absent' %} ❌ Absent {% elif attendance.status == 'late' %} ⚠️ Late {% elif attendance.status == 'half_day' %} ⏰ Half Day {% elif attendance.status == 'leave' %} 🏖️ Leave {% else %} {{ attendance.status|title }} {% endif %} {% if attendance.note %} {{ attendance.note[:50] }}{% if attendance.note|length > 50 %}...{% endif %} {% else %} - {% endif %}
{% else %}
📅

No attendance records yet

Start recording daily attendance above

{% endif %}

Quick Actions

👥 Manage Employees 💰 Manage Expenses 💳 Process Payments

Attendance Management Tips

📅 Daily Tracking: Record attendance for each employee daily

⏰ Time Tracking: Use check-in/check-out for accurate working hours

📊 Status Types: Present, Absent, Late, Half Day, Leave

📝 Notes: Add important information about attendance

{% endblock %}