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

Leave Balance Allocation (Post-Freeze)

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %} {% if guard_exists and guard_batch %}
Existing allocation found. Batch: {{ guard_batch.batch_key }} — same FY, leave type and strategy not yet revoked.
{% endif %}
FY label is the FY start year, for example 2026 for Apr 2026–Mar 2027.
Months up to this month are frozen.
Leave all employees unchecked to process every active employee.
Search
{% set selected_ids = selected_employee_ids or [] %} {% for employee in employees %}
{% else %}
No active employees found.
{% endfor %}
0 employee(s) selected Unchecked means all active employees.

{% if batch_result %}
Batch Results — {{ batch_result.leave_type }} {% if batch_result.batch_key %} Batch: {{ batch_result.batch_key }} {% endif %}
{% if batch_result.entries %} {{ batch_result.entries|length }} record(s) {% endif %}
{% for entry in batch_result.entries %} {% else %} {% endfor %}
# Employee Allocated (Δ) Remarks
{{ loop.index }} {{ entry.employee_name }} {% if entry.allocated|float > 0 %} {{ entry.allocated }} {% elif entry.allocated|float == 0 %} {{ entry.allocated }} {% else %} {{ entry.allocated }} {% endif %} {{ entry.remark }}
No allocation entries were generated.
{% endif %}
{% endblock %}