{% extends 'wfbo/_layout.html.twig' %} {% block wfbo_title %}Correct Result{% endblock %} {% block wfbo_content %} {% for flash in app.flashes('error') %} {% endfor %}
← Back to race

Race {{ race.raceNumber }} — {{ race.event.management.name }} · {{ race.event.eventDate|date('Y-m-d') }}

Fix the winning combinations below and preview. Only tickets whose outcome or payout changes are touched: wrong payouts are taken back from the player (the wallet can go negative), commission paid on tickets that now win is taken back from the agents, and the correct winners are paid. Applying re-grades the affected tickets automatically — you don't need to settle the race again.

{% if dividendRows is not empty %}
Currently saved
{% for row in dividendRows %}
{{ row.label }}: {% if row.refund %}Refunded{% endif %} {% for c in row.combinations %} {{ not loop.first ? ' · ' : (row.refund ? ' · ' : '') }}{% if c.selection %}{{ c.selection|capitalize }}{% else %}{{ c.numbers|join('-') }}{% endif %} : {{ c.dividend }} {% else %} {% if not row.refund %}—{% endif %} {% endfor %}
{% endfor %}
{% endif %}
{% if applying %}

New result saved for {{ changedLabels|join(', ') }}. Re-grading tickets… keep this page open until it finishes.

Back to race
{% else %} {% embed 'wfbo/event-races/_result_form.html.twig' with { formAction: path('app_wfbo_event_race_correct_result', {id: race.id}), csrfToken: csrf_token('wfbo_event_race_correct_result_' ~ race.id), formTestid: 'correct-result-form', } %} {% block actions %} {% if preview is not null %}

Preview — {{ preview.changeCount }} ticket{{ preview.changeCount == 1 ? '' : 's' }} will change

Only {{ changedLabels|join(', ') }} tickets are affected — every other bet type on this race keeps its settlement.

Taken back from players
₱{{ preview.clawback|number_format(2) }}
Commission taken back
₱{{ preview.commissionReversed|number_format(2) }}
Paid to players
₱{{ preview.newPayouts|number_format(2) }}
{% if preview.changes is empty %}

No settled ticket changes with these combinations.

{% else %}
{% for c in preview.changes %} {% endfor %}
Ticket Player Bet type Picks Was Becomes Wallet change Commission back
{{ c.reference }} {{ c.player }} {{ c.betType|replace({'_': ' '})|title }} {{ c.picks }} {{ c.oldStatus|capitalize }}{% if c.oldStatus == 'won' %} ₱{{ c.oldPayout|number_format(2) }}{% endif %} {{ c.newStatus|capitalize }}{% if c.newStatus == 'won' %} ₱{{ c.newPayout|number_format(2) }}{% endif %} {{ c.walletDelta < 0 ? '-' : '+' }}₱{{ c.walletDelta|abs|number_format(2) }} {{ c.commissionReversed > 0 ? '₱' ~ c.commissionReversed|number_format(2) : '—' }}
{% if preview.changeCount > preview.changes|length %}

+ {{ preview.changeCount - preview.changes|length }} more ticket(s) not listed (included in the totals).

{% endif %} {% endif %} {% if preview.negativeUsers is not empty %}
These players' wallets will go negative (they can't bet or withdraw until topped up): {% for u in preview.negativeUsers %} {{ not loop.first ? ', ' : '' }}{{ u.player }} (₱{{ u.balanceAfter|number_format(2) }}) {% endfor %}
{% endif %}
{% else %} {% endif %} {% endblock %} {% endembed %} {% endif %} {% endblock %}