{#- Win Rates export (A4 landscape, dompdf) - same matrix as the event page's Win Rates tab. -#} {%- macro wr_cell(c) -%} {%- if not c.offered -%} — {%- elseif c.settled == 0 -%} No settled bets {%- else -%} {%- set p = c.payoutRate -%} {%- set tone = p is null ? '' : (p > 100 ? 'red' : (p < 100 ? 'green' : '')) -%}
Payout % (large) = amount paid out ÷ amount staked on settled tickets — red over 100% (the house lost), green under 100% (the house won). Win % = winning tickets ÷ settled tickets (a boxed ticket counts once). Last line: payout / stake (₱, rounded). Settled bets only (won + lost), test accounts excluded; multi-race bets count under their last leg's race.
{% if winRateMatrix.columns is empty or races is empty %}{{ races is empty ? 'No races added yet.' : 'No bet types offered on this event yet.' }}
{% else %}| Race | {% for col in winRateMatrix.columns %}{{ col.label }} | {% endfor %}All bet types |
|---|---|---|
| {{ row.label }} | {% for col in winRateMatrix.columns %}{{ wr.wr_cell(row.cells[col.key]) }} | {% endfor %}{{ wr.wr_cell(row.all) }} |
| Total | {% for col in winRateMatrix.columns %}{{ wr.wr_cell(winRateMatrix.totals[col.key]) }} | {% endfor %}{{ wr.wr_cell(winRateMatrix.grandTotal) }} |