{% extends 'base.html' %} {% load static %} {% block title %}Projects Report | Fox Fitt{% endblock %} {% block content %} {# === PROJECT BATCH REPORT === Admin-only. Per-project lifetime aggregates. Filter by active/inactive/all. CSV download preserves the same filter. #}
{# === PAGE HEADER === #}

Projects Batch Report

{# === FILTER BAR === #}
{# === REPORT TABLE === #}
{% for row in project_rows %} {% empty %} {% endfor %}
Project Timeline Supervisors Teams Involved Workers Worker-Days Labour Cost
{{ row.project.name }} {% if not row.project.active %} Inactive {% endif %} {% if row.project.start_date %}{{ row.project.start_date|date:"d M Y" }}{% else %}{% endif %} → {% if row.project.end_date %}{{ row.project.end_date|date:"d M Y" }}{% else %}ongoing{% endif %} {{ row.supervisor_count }} {% for team_name in row.teams_involved %} {{ team_name }} {% empty %} {% endfor %} {{ row.worker_count }} {{ row.total_worker_days }} R {{ row.labour_cost|floatformat:2 }}
No projects match this filter.

Worker-Days = sum of workers across every day of work. Labour Cost = sum of daily rates for every worker on every day.

{% endblock %}