{% extends 'wfbo/_layout.html.twig' %} {% block title %}Withdrawals — WFBO{% endblock %} {% block wfbo_title %}Withdrawals{% endblock %} {% block wfbo_content %} {# Flash messages #} {% for flash in app.flashes('success') %} {% endfor %} {% for flash in app.flashes('error') %} {% endfor %} {# ── Search ── #}
{% if currentStatus %}{% endif %} {% if search %} Clear {% endif %}
{# ── Status filter tabs ── #}
{% set filters = [ {label: 'All', value: null}, {label: 'Pending', value: 'pending'}, {label: 'Approved', value: 'approved'}, {label: 'Rejected', value: 'rejected'}, ] %} {% for f in filters %} {{ f.label }} {% if f.value == 'pending' %} {{ pendingCount }} {% endif %} {% endfor %}
{# ── Total count + refresh ── #}

{{ total }} withdrawal{{ total != 1 ? 's' : '' }}{{ currentStatus ? ' (' ~ currentStatus ~ ')' : '' }}

↻ Refresh
{# ── Table ── #}
{% for withdrawal in withdrawals %} {% else %} {% endfor %}
# User Amount Submitted Bank Details Notes Status Actions
{{ withdrawal.id }}

{{ withdrawal.user.firstName }} {{ withdrawal.user.lastName }} {% if 'ROLE_MASTER_AGENT' in withdrawal.user.roles %} Agent {% endif %}

{{ withdrawal.user.userIdentifier }}

₱{{ withdrawal.amount|number_format(2) }} {{ withdrawal.createdAt|date('M d, Y H:i') }}

{{ withdrawal.bankName }}

{{ withdrawal.bankAccountName }}

{{ withdrawal.bankAccountNumber }}

{{ withdrawal.notes ?? '—' }} {% if withdrawal.status == 'pending' %} Pending {% elseif withdrawal.status == 'approved' %} Approved {% if withdrawal.reviewNote %}

{{ withdrawal.reviewNote }}

{% endif %} {% else %} Rejected {% if withdrawal.reviewNote %}

{{ withdrawal.reviewNote }}

{% endif %} {% endif %}
{% if withdrawal.status == 'pending' %}
{# Review note #}
{# Approve #}
{# Reject #}
{% else %}
{% if withdrawal.reviewedBy %} By {{ withdrawal.reviewedBy.firstName }}
{{ withdrawal.reviewedAt|date('M d, Y h:i A') }} {% else %} — {% endif %}
{% if currentStatus %}{% endif %}
{% if withdrawal.receiptPath %} {% set ext = withdrawal.receiptPath|split('.')|last|lower %} {% if ext in ['jpg', 'jpeg', 'png', 'gif', 'webp'] %} {% else %} View PDF {% endif %} {% endif %}
{% endif %}
No withdrawals found.
{# Pagination #} {% if totalPages > 1 %}

Page {{ currentPage }} of {{ totalPages }}

{% if currentPage > 1 %} ← Previous {% endif %} {% if currentPage < totalPages %} Next → {% endif %}
{% endif %} {# ── Receipt popup modal ── #}
Receipt
Receipt
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}