{% extends 'base.html' %} {% load static %} {% load format_tags %} {% block title %}Payroll Report | FoxFitt{% endblock %} {% block content %}
{{ start_date|date:"d M Y" }} — {{ end_date|date:"d M Y" }} | {{ project_name }} | {{ team_name }}
{{ start_date|date:"d M Y" }} — {{ end_date|date:"d M Y" }} | {{ project_name }} | {{ team_name }}
| 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 %} | {{ item.working_days|default:"—" }} | R {{ item.total|money }} | {% if item.working_days %}R {{ item.avg_per_working_day|money }}{% else %}—{% endif %} |
No lifetime project data.
{% endif %}| Team | Total Cost |
|---|---|
| {{ item.team }} | R {{ item.total|money }} |
No lifetime team data.
{% endif %}| Date | Amount Paid |
|---|---|
| {{ item.date|date:"d M Y" }} | R {{ item.total|money }} |
No payments in this period.
{% endif %}| Category | Total |
|---|---|
| {{ item.label }} | {% if item.is_deductive %}−{% endif %}R {{ item.total|money_abs }} |
No adjustments in this period.
{% endif %}| Project | Worker-Days | Day-Rate Cost |
|---|---|---|
| {{ item.project }} | {{ item.worker_days }} | R {{ item.total|money }} |
No project cost data.
{% endif %}| Team | Worker-Days | Day-Rate Cost |
|---|---|---|
| {{ item.team }} | {{ item.worker_days }} | R {{ item.total|money }} |
No team cost data.
{% endif %}| Project | Salaried Cost |
|---|---|
| {{ item.project }} | R {{ item.total|money }} |
No salaried (management) cost data.
{% endif %}| Worker | Days | Total Paid | {% comment %} Sign-aware headers: deductive types render in muted red so the negative sign on rows below is unmistakable. Finding 4. {% endcomment %} {% for h in active_adj_headers %}{{ h.label }} | {% endfor %}
|---|---|---|---|
| {{ w.name }} | {{ w.days }} | R {{ w.total_paid|money }} | {% comment %} Each val is now an "amount" Decimal plus an "is_deductive" bool — render the amount in red with a leading minus sign for deductive types. {% endcomment %} {% for val in w.adj_values %}{% if val.amount %} {% if val.is_deductive %}−{% endif %}R {{ val.amount|money_abs }} {% else %}-{% endif %} | {% endfor %}
Days reflect work logged in this period. Total Paid reflects payments received in this period — they may not match if a worker was paid in this period for previous-period work.
{% else %}No worker payment data for this period.
{% endif %}| Team | {% for col in team_project_activity.columns %}{{ col.name }} | {% endfor %}Total |
|---|---|---|
| {{ row.team_name }} | {% for col in team_project_activity.columns %}{% with days=row.cells_by_project_id|dictlookup:col.id %} {% if days %}{{ days }}{% else %}—{% endif %} {% endwith %} | {% endfor %}{{ row.row_total }} |
| Total | {% for col in team_project_activity.columns %}{{ team_project_activity.col_totals|dictlookup:col.id }} | {% endfor %}{{ team_project_activity.grand_total }} |
No team × project activity in this period.
{% endif %}