{% 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 %} {# ── Today's totals ── #}

Total Deposits

Today

₱{{ depositsToday|number_format(2) }}

{{ depositsTodayCount }} approved deposit{{ depositsTodayCount != 1 ? 's' : '' }}

Pending: ₱{{ pendingDepositsSum|number_format(2) }} ({{ pendingDepositsCount }})

Total Withdrawals

Today

₱{{ withdrawalsToday|number_format(2) }}

{{ withdrawalsTodayCount }} approved withdrawal{{ withdrawalsTodayCount != 1 ? 's' : '' }}

Pending: ₱{{ pendingWithdrawalsSum|number_format(2) }} ({{ pendingWithdrawalsCount }})

{# ── Withdrawals by requester tier (approved today, all pending) ── #} {% set tierCards = [ {key: 'masterAgent', label: 'Master Agent', slug: 'master-agent'}, {key: 'agent', label: 'Agent', slug: 'agent'}, {key: 'subAgent', label: 'Sub Agent', slug: 'sub-agent'}, {key: 'player', label: 'Player', slug: 'player'}, ] %}
{% for c in tierCards %} {% set t = withdrawalsByTier[c.key] %}

{{ c.label }}

Withdrawals · Today

₱{{ t.approved|number_format(2) }}

{{ t.approvedCount }} approved

Pending: ₱{{ t.pending|number_format(2) }} ({{ t.pendingCount }})

{% 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 %} {# Tint the row by bank/e-wallet, matching the deposit list. bankName is one of WithdrawalFormType::BANK_NAME_CHOICES; GCASH / MAYA / GOTYME are tinted, everything else is --other. Still normalised in case of legacy free-text values. #} {% set bank = withdrawal.bankName|upper|replace({' ': '', '-': '', '.': '', '_': ''}) %} {% if 'GCASH' in bank %} {% set rowClass = 'table-row--gcash' %} {% elseif 'MAYA' in bank %} {% set rowClass = 'table-row--maya' %} {% elseif 'GOTYME' in bank %} {% set rowClass = 'table-row--gotyme' %} {% else %} {% set rowClass = 'table-row--other' %} {% endif %} {% 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 %} Master Agent {% elseif 'ROLE_AGENT' in withdrawal.user.roles %} Agent {% elseif 'ROLE_SUB_AGENT' in withdrawal.user.roles %} Sub 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 %}