{% extends "base.html" %} {% block content %}

📊 Payroll Summary

Period: {{ "%02d"|format(month) }}/{{ year }}
{% if total_employees > 0 and (current_user.role and current_user.role.name and current_user.role.name|lower in ['hr','admin']) %}
Reason
{% endif %}
Total Employees
{{ total_employees }}
employees
Total Gross
₹{{ "{:,.2f}".format(total_gross or 0) }}
Total Net Pay
₹{{ "{:,.2f}".format(total_net or 0) }}
{% if records %} {% for r in records %} {% set row = r.record %} {% set paid_days = (row.present_days or 0) + (row.approved_leaves or 0) + (row.holidays or 0) + (row.weekends or 0) %} {% endfor %} {% else %} {% endif %}
# Emp Code Employee Department Present Leave Weekends Holiday LWP Days (Paid) Gross Deductions Net Pay CTC Status Frozen On Actions
{{ loop.index }} {{ row.employee.employee_code or '—' }}
{{ row.employee.full_name }}
{% if r.is_fnf %} FnF {% endif %}
{{ row.employee.department.name if row.employee.department else '—' }} {{ row.present_days|round(1) }} {{ row.approved_leaves }} {{ row.weekends }} {{ row.holidays }} {{ row.lwp_days }} {{ "%.2f"|format(paid_days) }} ₹{{ "{:,.2f}".format(row.gross_pay or 0) }} ₹{{ "{:,.2f}".format(row.deductions or 0) }} ₹{{ "{:,.2f}".format(row.net_pay or 0) }} ₹{{ "{:,.2f}".format(row.ctc or 0) }} {% set color = r.status_color or 'secondary' %} {% set label = r.status_label or 'Unknown' %} {{ label }} {{ row.freeze_date.strftime('%Y-%m-%d') if row.freeze_date else '—' }}
View PDF {% if current_user.role and current_user.role.name and current_user.role.name|lower in ['hr','admin'] %}
{% endif %}
No records to display for {{ "%02d"|format(month) }}/{{ year }}.
{% endblock %}