{% extends 'agent/_layout.html.twig' %} {% block title %}Agent Withdrawal{% endblock %} {% block agent_content %}

Withdrawal Request

Request a withdrawal from your wallet balance.

{# Flash messages #} {% for flash in app.flashes('success') %} {% endfor %} {# ── Withdrawal hours notice ── #} {% if agent_withdrawal_today_label %} {% endif %} {# ── Wallet balance hint ── #}

Available balance: ₱{{ app.user.walletBalance|number_format(2) }}

{# ── Withdrawal schedule status ── #}

Withdrawal Schedule

{% if not agent_withdrawal_configured %}

Agent withdrawals are currently disabled. Please check back later.

{% elseif agent_withdrawal_today_label %}

Withdrawal requests are accepted today from {{ agent_withdrawal_today_label }}.

{% else %}

Withdrawal requests are accepted during scheduled hours only.

{% endif %}
{# ── WITHDRAWALS BLOCKED FOR THIS ACCOUNT ── #} {% if blocked %}

Withdrawal requests are unavailable for your account

Please contact support for assistance.

{# ── NOT ALLOWED RIGHT NOW ── #} {% elseif not allowed %}

Not available right now

{% if agent_withdrawal_today_label %} Requests are accepted today from {{ agent_withdrawal_today_label }}. {% else %} Please try again during the scheduled withdrawal hours. {% endif %}

{# ── ALLOWED TODAY ── #} {% else %}

New Withdrawal Request

{% if insufficientFunds is defined and insufficientFunds %} {% endif %} {{ form_start(withdrawalForm, {attr: { 'data-testid': 'agent-withdrawal-form', 'novalidate': 'novalidate', 'data-turbo': 'false' }}) }} {# Error summary #} {% if withdrawalForm.vars.submitted and not withdrawalForm.vars.valid %} {% endif %} {# Amount #}
{{ form_label(withdrawalForm.amount, null, {label_attr: {class: 'form-label--sm'}}) }} {{ form_widget(withdrawalForm.amount) }} {{ form_errors(withdrawalForm.amount) }}

Maximum: ₱{{ app.user.walletBalance|number_format(2) }}

{# Bank details #}

Bank / E-Wallet Details

{{ form_label(withdrawalForm.bankName, null, {label_attr: {class: 'form-label--sm'}}) }} {{ form_widget(withdrawalForm.bankName) }} {{ form_errors(withdrawalForm.bankName) }}
{{ form_label(withdrawalForm.bankAccountName, null, {label_attr: {class: 'form-label--sm'}}) }} {{ form_widget(withdrawalForm.bankAccountName) }} {{ form_errors(withdrawalForm.bankAccountName) }}
{{ form_label(withdrawalForm.bankAccountNumber, null, {label_attr: {class: 'form-label--sm'}}) }} {{ form_widget(withdrawalForm.bankAccountNumber) }} {{ form_errors(withdrawalForm.bankAccountNumber) }}
{{ form_label(withdrawalForm.notes, null, {label_attr: {class: 'form-label--sm'}}) }} {{ form_widget(withdrawalForm.notes) }}
{{ form_end(withdrawalForm) }}
{% endif %} {# ── Withdrawal History ── #} {% if total > 0 or allowed %}

History

{% for withdrawal in withdrawals %} {% else %} {% endfor %}
Date Amount Bank Details Status Review Note
{{ withdrawal.createdAt|date('M d, Y') }} ₱{{ withdrawal.amount|number_format(2) }}

{{ withdrawal.bankName }}

{{ withdrawal.bankAccountName }}

{{ withdrawal.bankAccountNumber }}

{% if withdrawal.status == 'pending' %} Pending {% elseif withdrawal.status == 'approved' %} Approved {% else %} Rejected {% endif %} {{ withdrawal.reviewNote ?? '—' }}
No withdrawal requests yet.
{# Pagination #} {% if totalPages > 1 %}

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

{% if currentPage > 1 %} ← Previous {% endif %} {% if currentPage < totalPages %} Next → {% endif %}
{% endif %} {% endif %} {% endblock %}