Page body
What this widget shows
Player Liability shows current liability grouped by currency and then summarizes that result into four cards:
- Total Liability
- Positive Liability
- Negative Liability
- Currency Count
Use it when you need a quick exposure snapshot across wallet currencies.
How to read it
The table itself is a currency list. Each row shows:
- the currency code
- the liability amount for that currency
The backend SQL also returns a visible Total rollup row in the table. The summary cards do not use that row.
The summary cards above the table are calculated in the frontend from the returned row set.
What the summary cards mean
Total Liability: sum of all displayed currency liabilitiesPositive Liability: sum of liabilities greater than zeroNegative Liability: sum of liabilities below zeroCurrency Count: number of currency rows included in the calculation
Common questions
Why is there no row named Total in the summary cards?
Because the frontend explicitly removes the backend row where currencyCode === 'Total' before calculating the summary cards.
Why do the date filters not seem to change the result?
Because the current backend implementation loads a wallet-liability SQL snapshot and only applies the isStreamerData filter. The selected date range is validated in the service layer but is not injected into the SQL query.
Why can I not change the date option on the mounted dashboard?
Because the current backoffice widget does not render a date-option selector. The hook still sends dateOptions=last7days plus default dates, but the mounted dashboard only exposes:
Streamer dataDownload CSVRefresh data
For practical use, treat this widget as a current liability snapshot, not a historical liability timeline.
What is being summed in the backend?
The backend SQL sums wallet amounts by currency and normalizes them by exchange rate before grouping.
What currency are the money cards in, and which rate is used?
The money values (Total Liability, Positive Liability, Negative Liability) are expressed in the reporting currency, EUR — the currency flagged as primary in the currencies table, which carries an exchange rate of 1.
Each currency row is converted in the backend SQL as wallet.amount / exchange_rate, where exchange_rate comes from the currencies reference table joined on the currency code.
Two things to keep in mind:
- Current-rate basis, not transaction-time. The conversion uses the single, admin-maintained rate currently stored per currency. Wallets only store an amount and a currency code, so there is no rate captured at the time each balance was created. The whole liability is re-stated at today's stored rate, and the total will move whenever an operator changes a currency's exchange rate.
- Missing or zero rate falls back to 1. If a currency's
exchange_rateis0or empty, the conversion divides by1instead. That means the raw foreign amount is added into the EUR total with no conversion, which can over- or under-state that currency's contribution. This is not shown in the card label.
Known caveats
- The date UI suggests a historical filter, but the current backend SQL does not use the selected dates.
- The mounted dashboard does not expose a date-option selector, so the custom-date branch is currently unreachable.
- Summary cards are frontend-derived from the returned currency rows.
- The backend also returns a
Totalrollup row, but the frontend excludes it from the summary-card calculation.