{% extends 'wfbo/_layout.html.twig' %} {% block title %}Deposits — WFBO{% endblock %} {% block wfbo_title %}Deposits{% endblock %} {% block wfbo_content %} {% set overdueParam = overdueMode ? 1 : null %} {# Flash messages #} {% for flash in app.flashes('success') %} {% 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 }})

{# ── Overdue pending alert ── #} {% if overdueMode %} {% else %} {% endif %} {# ── 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 }} deposit{{ total != 1 ? 's' : '' }}{{ currentStatus ? ' (' ~ currentStatus ~ ')' : '' }}

↻ Refresh
{# ── Table ── #}
{% for deposit in deposits %} {% set paymentLabel = deposit.paymentDetail ? deposit.paymentDetail.label|upper : '' %} {% set paymentBank = deposit.paymentDetail ? deposit.paymentDetail.bankName|upper : '' %} {% if paymentLabel == 'GCASH' or paymentBank == 'GCASH' %} {% set rowClass = 'table-row--gcash' %} {% elseif paymentLabel == 'MAYA' or paymentBank == 'MAYA' %} {% set rowClass = 'table-row--maya' %} {% elseif paymentLabel == 'GOTYME' or paymentBank == 'GOTYME' %} {% set rowClass = 'table-row--gotyme' %} {% else %} {% set rowClass = 'table-row--other' %} {% endif %} {% else %} {% endfor %}
# User Amount Sent To Ref. No. Submitted Notes Status Actions
{{ deposit.id }}

{{ deposit.user.firstName }} {{ deposit.user.lastName }}

{{ deposit.user.userIdentifier }}

{{ deposit.amount|number_format(2) }}

{% if deposit.approvedAmount is not null %}

Approved: {{ deposit.approvedAmount|number_format(2) }}

{% endif %}
{% if deposit.paymentDetail %}

{{ deposit.paymentDetail.label }}

{{ deposit.paymentDetail.bankName }}

{{ deposit.paymentDetail.accountNumber }}

{% else %} — {% endif %}
{{ deposit.transactionReference ?? '—' }} {{ deposit.createdAt|date('M d, Y H:i') }} {{ deposit.notes ?? '—' }} {% if deposit.status == 'pending' %} Pending {% elseif deposit.status == 'approved' %} Approved {% if deposit.reviewNote %}

{{ deposit.reviewNote }}

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

{{ deposit.reviewNote }}

{% endif %} {% endif %}
{% set reviewHandler = deposit.paymentDetail ? deposit.paymentDetail.financeHandler : null %} {% set canReview = reviewHandler ? (reviewHandler.id == app.user.id) : is_granted('ROLE_ADMIN') %} {% set currentPaymentDetailId = deposit.paymentDetail ? deposit.paymentDetail.id : null %} {% if deposit.status == 'pending' and not canReview %}

{% if reviewHandler %}Assigned to {{ reviewHandler.firstName }} {{ reviewHandler.lastName }} {% else %}No handler assigned — admin only{% endif %}

{% elseif deposit.status == 'pending' %}
{# Approved amount override #} {# Review note #}
{# Approve #}
{# Reject #}
{# Transfer to another payment method's handler #}
{% if deposit.transactionImagePath %} {% set ext = deposit.transactionImagePath|split('.')|last|lower %} {% if ext in ['jpg', 'jpeg', 'png', 'gif', 'webp'] %} {% else %} View PDF {% endif %} {% endif %}
{% else %}
{% if deposit.reviewedBy %} By {{ deposit.reviewedBy.firstName }}
{{ deposit.reviewedAt|date('M d, Y h:i A') }} {% else %} — {% endif %}
{% if deposit.transactionImagePath %} {% set ext = deposit.transactionImagePath|split('.')|last|lower %} {% if ext in ['jpg', 'jpeg', 'png', 'gif', 'webp'] %} {% else %} View PDF {% endif %} {% endif %}
{% endif %}
No deposits found.
{# Pagination #} {% if totalPages > 1 %}

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

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