{% load format_tags %}
FOXFITT CONSTRUCTION
Payroll Report {{ start_date|date:"d F Y" }} – {{ end_date|date:"d F Y" }}
{{ start_date|date:"d M Y" }} – {{ end_date|date:"d M Y" }}  ·  {{ project_name }}  ·  {{ team_name }}
Paid This Period
R {{ total_paid_out|money }}
{{ start_date|date:"d M Y" }} – {{ end_date|date:"d M Y" }}
Outstanding Now
R {{ current_outstanding.total|money }}
as of {{ current_as_of|date:"d M Y H:i" }}
FoxFitt Avg / Day
R {{ company_avg_daily|money }}
lifetime avg · {{ company_working_days }} working days
FoxFitt Avg / Month
R {{ company_avg_monthly|money }}
lifetime avg · ~30.44 days/month
ILifetime Context

All Time — Projects

{% if alltime_projects %} {% for item in alltime_projects %} {% endfor %}
Project Start Last Activity Working Days Total Cost Avg R / Working Day
{{ item.project }} {% if item.start_date %}{{ item.start_date|date:"d M Y" }}{% else %}{% endif %} {% if item.last_activity %}{{ item.last_activity|date:"d M Y" }}{% else %}{% endif %} {% if item.working_days %}{{ item.working_days }}{% else %}{% endif %} R {{ item.total|money }} {% if item.working_days %}R {{ item.avg_per_working_day|money }}{% else %}{% endif %}
{% else %}

No lifetime project data.

{% endif %}

All Time — Teams

{% if alltime_teams %} {% for item in alltime_teams %} {% endfor %}
Team Total Cost
{{ item.team }} R {{ item.total|money }}
{% else %}

No lifetime team data.

{% endif %}
IISelected Period: {{ start_date|date:"d M Y" }} – {{ end_date|date:"d M Y" }}
Total Paid Out
R {{ total_paid_out|money }}
Worker-Days
{{ total_worker_days }}
Loans Issued
R {{ loans_issued|money }}
Loans Outstanding
R {{ loans_outstanding|money }}
Advances Issued
R {{ advances_issued|money }}
Advances Outstanding
R {{ advances_outstanding|money }}

LABOUR COST — PROJECTS

{% if cost_per_project %} {% for item in cost_per_project %} {% endfor %}
{{ item.project }} {{ item.worker_days }} days R {{ item.total|money }}
{% else %}

No project cost data.

{% endif %}

LABOUR COST — TEAMS

{% if cost_per_team %} {% for item in cost_per_team %} {% endfor %}
{{ item.team }} {{ item.worker_days }} days R {{ item.total|money }}
{% else %}

No team cost data.

{% endif %}

PAYMENTS BY DATE

{% if payments_by_date %} {% for item in payments_by_date %} {% endfor %}
{{ item.date|date:"d M Y" }} R {{ item.total|money }}
{% else %}

No payments in this period.

{% endif %}

ADJUSTMENTS

{% if adjustment_totals %} {% for item in adjustment_totals %} {% endfor %}
{{ item.label }} R {{ item.total|money }}
{% else %}

No adjustments in this period.

{% endif %}
IIIWorker Breakdown
{% if worker_breakdown %} {% for label in active_adj_labels %} {% endfor %} {% for w in worker_breakdown %} {% for val in w.adj_values %} {% if val %} {% else %} {% endif %} {% endfor %} {% endfor %}
WORKER DAYS TOTAL PAID{{ label|upper }}
{{ w.name }} {{ w.days }} R {{ w.total_paid|money }}R {{ val|money }}
{% else %}

No worker payment data for this period.

{% endif %}
IVTeam × Project Activity
{% if team_project_activity.rows %} {% for col in team_project_activity.columns %} {% endfor %} {% for row in team_project_activity.rows %} {% for col in team_project_activity.columns %} {% with days=row.cells_by_project_id|dictlookup:col.id %} {% if days %} {% else %} {% endif %} {% endwith %} {% endfor %} {% endfor %} {% for col in team_project_activity.columns %} {% endfor %}
Team{{ col.name }}Total
{{ row.team_name }}{{ days }}{{ row.row_total }}
Total{{ team_project_activity.col_totals|dictlookup:col.id }}{{ team_project_activity.grand_total }}
{% else %}

No team × project activity in this period.

{% endif %}