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

Allocation Batches

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
Reset
{% for b in batches %} {% set agg = totals_by_batch.get(b.id, {'sum_delta': 0.0, 'count': 0}) %} {% else %} {% endfor %}
# Batch Key FY Leave Type Strategy Run At Run By Entries Total Δ Status Actions
{{ loop.index + ((pagination.page-1) * pagination.per_page) }} {{ b.batch_key }} {{ b.fy_label }} {% set lt = leave_types | selectattr('id','equalto', b.leave_type_id) | list %} {% if lt and lt[0] %} {{ lt[0].name }} ({{ lt[0].code }}) {% else %} - {% endif %} {{ b.strategy }} {{ b.run_at.strftime('%Y-%m-%d %H:%M') if b.run_at }} {{ b.run_by_id or '-' }} {{ agg.count }} {{ '%.2f'|format(agg.sum_delta) }} {% if b.is_revoked %} Revoked {% else %} Active {% endif %} View Export {% if not b.is_revoked %}
{% endif %}
No batches found.
{% if pagination.pages > 1 %} {% endif %}
{% endblock %}