added checkbox for invoice calls

formatting

separated logic for get and post

created custom month field

fixed formatting

fixed imports
This commit is contained in:
Kenneth SOARES
2025-06-02 16:51:29 +02:00
parent 6803294358
commit 6e13e4fb36
4 changed files with 172 additions and 20 deletions

View File

@ -15,23 +15,32 @@
</select>
<input type="submit" value="{% trans %}Go{% endtrans %}" />
</form>
<br>
<p>{% trans %}CB Payments{% endtrans %} : {{ sum_cb }} €</p>
<br>
<table>
<thead>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Sum{% endtrans %}</td>
</thead>
<tbody>
{% for i in sums %}
<tr>
<td>{{ i['club__name'] }}</td>
<td>{{"%.2f"|format(i['selling_sum'])}} €</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
<form method="post" action="">
{% csrf_token %}
<br>
<p>{% trans %}CB Payments{% endtrans %} : {{ sum_cb }} €</p>
<br>
<table>
<thead>
<td>{% trans %}Club{% endtrans %}</td>
<td>{% trans %}Sum{% endtrans %}</td>
<td>{% trans %}Validated{% endtrans %}</td>
</thead>
<tbody>
{% for i in sums %}
<tr>
<td>{{ i['club__name'] }}</td>
<td>{{"%.2f"|format(i['selling_sum'])}} €</td>
<td>
<input type="checkbox" name="validate_{{ i['club__name'] }}" {% if validated[i['club__name']] %}checked{% endif %}>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<input type="hidden" name="month" value="{{ start_date|date('Y-m') }}">
<button type="submit">{% trans %}Save validation{% endtrans %}</button>
</form>
{% endblock %}