{% 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 %} {# ── Approval hours notice ── #} {# ── Wallet balance hint ── #}

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

{# ── Allowed days info ── #}

Withdrawal Schedule

{% if allowedDays is not empty %}

Withdrawals are accepted every {{ allowedDays|join(', ') }}.

{% else %}

No withdrawal days have been configured yet. Please check back later.

{% endif %}
{# ── NOT ALLOWED TODAY ── #} {% if not allowed %}

Not available today

Today is not a withdrawal day.

{% if nextDay %}

Next available: {{ nextDay }}

{% 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 %}