Add settled balance panel, cash booking mode, and Kasse dashboard line
- Balance panel turns green with "Bezahlt ✓" + breakdown when open_balance <= 0, on all four tab pages (me, pay, staff_user, staff_pay) - booking_mode radio on me.html and staff_user.html: normal / for_free / cash_paid; cash_paid auto-creates matching UserPayment(method=cash) - Dashboard finance section shows "Kasse (bar)" sum of all cash payments for cross-checking - staff_pay prefill lower-capped at 0; "Zahlung eintragen" always visible on staff_user Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,20 +19,33 @@
|
||||
{% if is_anonymous_target %}
|
||||
<p class="muted">Anonyme Buchungen werden automatisch als bar bezahlt eingetragen.</p>
|
||||
{% else %}
|
||||
<section class="total-box">
|
||||
<span class="total-label">Rechnung</span>
|
||||
<span class="total-value">{{ total|floatformat:2 }} €</span>
|
||||
{% if paid %}
|
||||
<span class="total-label">Bezahlt</span>
|
||||
<span class="total-value">{{ paid|floatformat:2 }} €</span>
|
||||
<span class="total-label">Offen</span>
|
||||
<span class="total-value">{{ open_balance|floatformat:2 }} €</span>
|
||||
<section class="total-box {% if paid and open_balance <= 0 %}total-box-settled{% endif %}">
|
||||
{% if paid and open_balance <= 0 %}
|
||||
<span class="total-settled">Bezahlt ✓</span>
|
||||
<div class="total-breakdown">
|
||||
<span>Drinks {{ total|floatformat:2 }} €</span>
|
||||
<span>·</span>
|
||||
<span>Bezahlt {{ paid|floatformat:2 }} €</span>
|
||||
<span>·</span>
|
||||
{% if open_balance < 0 %}
|
||||
<span>Spende {{ open_balance|floatformat:2|slice:"1:" }} €</span>
|
||||
{% else %}
|
||||
<span>Genau bezahlt</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="total-label">Rechnung</span>
|
||||
<span class="total-value">{{ total|floatformat:2 }} €</span>
|
||||
{% if paid %}
|
||||
<span class="total-label">Bezahlt</span>
|
||||
<span class="total-value">{{ paid|floatformat:2 }} €</span>
|
||||
<span class="total-label">Offen</span>
|
||||
<span class="total-value">{{ open_balance|floatformat:2 }} €</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
{% if open_balance > 0 %}
|
||||
<p><a href="{% url 'suff:staff_pay' tab_user.username %}" class="btn-primary">Zahlung eintragen</a></p>
|
||||
{% endif %}
|
||||
<p><a href="{% url 'suff:staff_pay' tab_user.username %}" class="btn-primary">Zahlung eintragen</a></p>
|
||||
{% endif %}
|
||||
|
||||
{% if phase == "booking" %}
|
||||
@@ -41,8 +54,12 @@
|
||||
<form method="post" action="{% url 'suff:staff_book' tab_user.username %}">
|
||||
{% csrf_token %}
|
||||
<label class="for-free-toggle">
|
||||
<input type="checkbox" name="for_free" value="1" />
|
||||
<span>Gratis (z.b. Artists am Spieltag)</span>
|
||||
<input type="radio" name="booking_mode" value="for_free" />
|
||||
<span>Gratis (z.B. Artists am Spieltag)</span>
|
||||
</label>
|
||||
<label class="for-free-toggle">
|
||||
<input type="radio" name="booking_mode" value="cash_paid" />
|
||||
<span>Direkt bar bezahlt</span>
|
||||
</label>
|
||||
<div class="drink-grid">
|
||||
{% for drink in drinks %}
|
||||
|
||||
Reference in New Issue
Block a user