{% extends 'wfbo/_layout.html.twig' %} {% block title %}Report — WFBO{% endblock %} {% block wfbo_title %}Report{% endblock %} {% block wfbo_content %} {# ── Period filter bar ── #} {% set presets = [ {key: 'today', label: 'Today'}, {key: 'yesterday', label: 'Yesterday'}, {key: 'this_month', label: 'This Month'}, {key: 'last_month', label: 'Last Month'}, {key: 'this_year', label: 'This Year'}, ] %}
{% for p in presets %} {{ p.label }} {% endfor %} {# Custom month picker #}
{# Custom year picker #}
{# Specific date picker #}
{% if dateError %}

{{ dateError }}

{% endif %} {# ── Summary cards ── #}

Total Deposits

{{ periodLabel }}

₱{{ depositsIn|number_format(2) }}

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

Pending: ₱{{ pendingDepositsIn|number_format(2) }} ({{ pendingDepositCount }})

Total Withdrawals

{{ periodLabel }}

₱{{ withdrawalsOut|number_format(2) }}

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

Pending: ₱{{ pendingWithdrawalsOut|number_format(2) }} ({{ pendingWithdrawalCount }})

Cash on Hand

{{ periodLabel }}

₱{{ cashOnHand|number_format(2) }}

approved deposits, less approved withdrawals and expenses

{# ── Summary breakdown table ── #}
Flow Transactions Amount
↑ Cash In — Approved Deposits {{ periodLabel }} {{ depositCount }} ₱{{ depositsIn|number_format(2) }}
↓ Cash Out — Approved Withdrawals {{ periodLabel }} {{ withdrawalCount }} ₱{{ withdrawalsOut|number_format(2) }}
↓ Expenses {{ periodLabel }} {{ expenses|length }} ₱{{ expenseTotal|number_format(2) }}
Cash on Hand {{ periodLabel }} ₱{{ cashOnHand|number_format(2) }}
{# ── Approved deposits by loader ── #}
{% for row in financeBreakdown %} {% else %} {% endfor %}
Name {{ periodLabel }} Approved Deposits
{{ row.user.firstName }} {{ row.user.lastName }} ₱{{ row.total|number_format(2) }}
No loaders configured.
Unassigned / Other ₱{{ unassignedDepositTotal|number_format(2) }}
Total ₱{{ depositsIn|number_format(2) }}
{# ── Approved withdrawals by approver ── #}
{% for row in withdrawalBreakdown %} {% else %} {% endfor %}
Name {{ periodLabel }} Approved Withdrawals
{{ row.user.firstName }} {{ row.user.lastName }} ₱{{ row.total|number_format(2) }}
No approved withdrawals for this period.
Unassigned / Other ₱{{ unassignedWithdrawalTotal|number_format(2) }}
Total ₱{{ withdrawalsOut|number_format(2) }}
{# ── Wallet System Adjustments by staff member ── #}
{% for row in adjustmentBreakdown %} {% else %} {% endfor %}
Name {{ periodLabel }} Adjustments Net Amount
{{ row.user.firstName }} {{ row.user.lastName }} {{ row.count }} {{ row.total < 0 ? '−₱' ~ (row.total * -1)|number_format(2) : '₱' ~ row.total|number_format(2) }}
No system adjustments for this period.
Total {{ adjustmentCount }} {{ adjustmentTotal < 0 ? '−₱' ~ (adjustmentTotal * -1)|number_format(2) : '₱' ~ adjustmentTotal|number_format(2) }}
{# ── Bonuses credited to player wallets (deposit promos, claimable bonuses) ── #}
{% for row in bonusBreakdown %} {% set rowKey = row.campaignId ? 'campaign-' ~ row.campaignId : row.source %} {% else %} {% endfor %}
Bonuses Paid {{ periodLabel }} Bonuses Amount
{% if is_granted('ROLE_SUPER_ADMIN') and row.campaignId %} {{ row.label }} {% elseif is_granted('ROLE_SUPER_ADMIN') and row.source == 'player_bonus' %} {{ row.label }} {% else %} {{ row.label }} {% endif %} {{ row.count }} ₱{{ row.total|number_format(2) }}
No bonuses paid in this period.
Total {{ bonusCount }} ₱{{ bonusTotal|number_format(2) }}

Bonuses are credited to player wallets. They are not deposits, so they don't change Deposits In, Loaders or Cash on Hand; they only leave the house when the player withdraws.

{# ── Expenses recorded in the period ── #}
{% for e in expenses %} {% else %} {% endfor %}
Expenses {{ periodLabel }} Description Recorded By Receipt Amount
{{ e.expenseDate|date('M d, Y') }} {{ e.description }} {{ e.recordedBy.firstName }} {{ e.recordedBy.lastName }} {% if e.attachmentUrl %} View {% else %} — {% endif %} ₱{{ e.amount|number_format(2) }}
No expenses for this period.
Total ₱{{ expenseTotal|number_format(2) }}
{% endblock %}