front chips logic

This commit is contained in:
SowinskiBraeden committed 2026-03-21 14:53:47 -07:00
1 parent 5a488daa8f
commit c4df0dbcbe
5 files changed
+102 -19

No files matched your search

+2 -1
View File
@@ -33,6 +33,7 @@
<span>Event type</span>
<select name="event_type" required>
<option value="buyin">Buy-in</option>
<option value="front">Front</option>
<option value="cashout">Cash-out</option>
<option value="paid">Paid out</option>
<option value="note">Note only</option>
@@ -46,7 +47,7 @@
<label>
<span>Note</span>
<textarea name="note" rows="4" placeholder="Rebuy, correction, partial payout, e-transfer sent, cash paid, etc."></textarea>
<textarea name="note" rows="4" placeholder="Rebuy, fronted chips, correction, partial payout, e-transfer sent, cash paid, etc."></textarea>
</label>
<button class="primary-button" type="submit">Add event</button>
+17 -3
View File
@@ -20,9 +20,9 @@
</div>
</section>
<section class="grid three-col">
<section class="grid payout-summary-grid">
<article class="panel stat-card">
<span>Total cash-out due</span>
<span>Total payout due</span>
<strong>{{ session.total_payout_due_cents | money }}</strong>
</article>
@@ -33,10 +33,22 @@
<article class="panel stat-card">
<span>Total remaining</span>
<strong class="{{ 'negative' if session.total_remaining_cents > 0 else '' }}">
<strong class="{{ 'negative' if session.total_remaining_cents > 0 else 'positive' }}">
{{ session.total_remaining_cents | money }}
</strong>
</article>
<article class="panel stat-card">
<span>Total fronted</span>
<strong>{{ session.total_front_cents | money }}</strong>
</article>
<article class="panel stat-card">
<span>Players still owe</span>
<strong class="{{ 'negative' if session.total_player_owes_cents > 0 else '' }}">
{{ session.total_player_owes_cents | money }}
</strong>
</article>
</section>
<section class="panel results-panel results-panel-full">
@@ -53,6 +65,7 @@
<tr>
<th>Player</th>
<th>Buy-in</th>
<th>Fronted</th>
<th>Cash-out</th>
<th>Net</th>
<th>Status</th>
@@ -70,6 +83,7 @@
</a>
</td>
<td>{{ entry.buy_in_cents | money }}</td>
<td>{{ entry.front_cents | money }}</td>
<td>{{ entry.cash_out_cents | money }}</td>
<td class="{{ 'positive' if entry.net_cents > 0 else 'negative' if entry.net_cents < 0 else '' }}">
{{ entry.net_cents | money }}