{# === WORK LOG PAYROLL — FULL PAGE === #} {# Shareable, bookmark-able view for one work log's payroll status. #} {# Same data source as the modal; different presentation. #} {% extends "base.html" %} {% load format_tags %} {% block title %}Work Log {{ log.date|date:"d M Y" }} | FoxFitt{% endblock %} {% block content %}
{# === Breadcrumb === #} {# === Page header === #}

Work Log Payroll

Who was paid for this day's work and who is still outstanding.

Back to history
{# === Attendance card === #}
Attendance
Workers present: {{ worker_rows|length }}
Overtime hours: {{ log.overtime_amount|default:0 }}
Supervisor: {% if log.supervisor %}{{ log.supervisor.get_full_name|default:log.supervisor.username }}{% else %}—{% endif %}
{% if pay_period.0 %}
Pay period: {{ pay_period.0|date:"d M" }} – {{ pay_period.1|date:"d M Y" }}
{% else %}
Pay period: no schedule {% if log.team %}configure{% endif %}
{% endif %}
{# === Unpriced OT banner === #} {% if overtime_needs_pricing %}
Overtime on this log hasn't been priced yet. Price now.
{% endif %} {# === Workers table === #}
Workers on this log
{% for row in worker_rows %} {% endfor %}
Worker Status Earned Payslip Paid on
{{ row.worker.name }} {% if not row.worker.active %}Inactive{% endif %} {% if row.status == 'Paid' %} Paid {% elif row.status == 'Priced, not paid' %} Priced, not paid {% else %} Unpaid {% endif %} R {{ row.earned|money }} {% if row.payroll_record %} #{{ row.payroll_record.pk }} {% else %}—{% endif %} {{ row.paid_date|date:"d M Y"|default:"—" }}
{# === Adjustments card (only when present) === #} {% if adjustments %}
Adjustments on this log
{% for adj in adjustments %} {% endfor %}
TypeWorkerAmountPayslip
{{ adj.type }} {{ adj.worker.name }} R {{ adj.amount|money }} {% if adj.payroll_record %} #{{ adj.payroll_record.pk }} {% else %}unpaid{% endif %}
{% endif %} {# === Totals footer === #}
Total earned: R {{ total_earned|money }}
Paid: R {{ total_paid|money }}
Outstanding: R {{ total_outstanding|money }}
{% endblock %}