{% extends 'wfbo/_layout.html.twig' %} {% block wfbo_title %}Race Details{% endblock %} {% block wfbo_content %} {% for flash in app.flashes('success') %} {% endfor %} {% for flash in app.flashes('error') %} {% endfor %}
← Back to Event

Race {{ race.raceNumber }}

Arena
{{ race.event.management.name }}
Event Date
{{ race.event.eventDate|date('Y-m-d') }}
Status
{% if race.open %} Open {% elseif race.closed %} Closed {% else %} Settled {% endif %}
{% if race.event.videoUrl %} {% set embedUrl = race.event.videoUrl|replace({'watch?v=': 'embed/', 'youtu.be/': 'youtube.com/embed/'}) %} {% if 'embed/' not in embedUrl %} {% set embedUrl = race.event.videoUrl %} {% endif %}
{% endif %} {% if race.open %}

Late Scratch should be checked after the close betting.

{% endif %}
{% if race.open %}

Horses

{% if not race.event.published %} + Add Horse {% endif %}
{% if not race.event.published %}

Scratch becomes available once the event is published.

{% endif %} {# Empty carrier form: checkboxes/Save button below reference it via the HTML5 form="" attribute so they can submit together without nesting
tags around each row's own Delete form. #}
{% if horses is empty %}

No horses added yet.

{% else %} {% for horse in horses %} {% endfor %}
Horse # Name Jockey Trainer Status Scratch Actions
{{ horse.horseNumber }} {{ horse.horseName }} {{ horse.horseJockey }} {{ horse.horseTrainer ?: '—' }} {% if horse.active %} Active {% else %} Scratched {% endif %} {% if horse.active and race.event.published %} {% else %} — {% endif %} {% if not race.event.published %}
Edit
{% else %} — {% endif %}
{% if race.event.published and horses|filter(h => h.active) is not empty %}
{% endif %} {% endif %}
{% endif %}{# /race.open #}

Result

{% macro combo_row(row, idx, combo) %} {% if row.isOddEven %}
=
{% else %}
{% for slot in row.slots %} {% set slotIdx = loop.index0 %} {% if not loop.first %}-{% endif %} {% endfor %}
=
{% endif %} {% endmacro %} {% if race.hasResult %}
{% if not race.settled %}

Result saved. It can no longer be edited — go to Settlements to settle pending bets.

{% endif %}
Winner{{ race.result|length > 1 ? 's' : '' }}
{% for entry in race.result %} {{ not loop.first ? ', ' : '' }}Horse #{{ entry.horseNumber }} {% else %}—{% endfor %}
Result Set At
{{ race.resultSetAt|date('Y-m-d H:i') }}
{% set scratchedAfterClose = horses|filter(h => h.scratchedAfterClose) %} {% if scratchedAfterClose is not empty %}
Scratched After Close
{% for horse in scratchedAfterClose %} {{ not loop.first ? ', ' : '' }}Horse #{{ horse.horseNumber }} {% endfor %}
{% endif %} {% if dividendRows is not empty %}
Winning combinations
{% 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 %}
{% elseif race.closed %}

Scratch after close

Tick any horse that withdrew after betting closed. Any bet on a scratched horse is voided and the full stake refunded (pick-N combos treat the scratched leg as a wildcard). Exception: a Daily Double / Extra Double horse scratched after close in the last leg is not voided — it is graded against the winning combinations you enter below, so add a combination that uses the scratched runner if those tickets should still be paid.

{% for horse in horses %} {% if horse.active %}
{% elseif horse.scratchedAfterClose %}
Horse #{{ horse.horseNumber }} ({{ horse.horseName }}) — Scratched
{% else %}
Horse #{{ horse.horseNumber }} ({{ horse.horseName }}) — Scratched (before close)
{% endif %} {% endfor %}
{% if combinationRows is not empty %}

Winning combinations

For each bet type, enter every winning combination (pick the horse for each position / leg) and its dividend. Add a row per winning combination — that covers dead heats too. Refund voids that bet type on this race.

{% for row in combinationRows %}
{% if row.kind == 'single' and not row.isOddEven %} {% endif %}
{% set saved = row.savedCombinations %} {% for combo in (saved is empty ? [null] : saved) %} {{ _self.combo_row(row, loop.index0, combo) }} {% endfor %}
{% endfor %}
{% endif %}
{% else %}

Close betting to enter the result.

{% endif %} {% endblock %}