{% extends 'base.html' %} {% load static %} {% block title %}Teams Report | Fox Fitt{% endblock %} {% block content %} {# === TEAM BATCH REPORT === Admin-only. Per-team lifetime aggregates. Filter by active/inactive/all. CSV download preserves the same filter. #}
| Team | Supervisor | Workers | Pay Schedule | Work Days | Worker-Days | Labour Cost | Projects |
|---|---|---|---|---|---|---|---|
| {{ row.team.name }} {% if not row.team.active %} Inactive {% endif %} | {% if row.team.supervisor %} {{ row.team.supervisor.username }} {% else %} — {% endif %} | {{ row.worker_count }} | {% if row.team.pay_frequency %} {{ row.team.get_pay_frequency_display }} {% else %} Not set {% endif %} | {{ row.total_work_days }} | {{ row.total_worker_days }} | R {{ row.labour_cost|floatformat:2 }} | {% for project_name in row.projects_touched %} {{ project_name }} {% empty %} — {% endfor %} |
| No teams match this filter. | |||||||
Work Days = total attendance records. Worker-Days = sum of workers across all records. Labour Cost = sum of daily rates for every worker on every day.