view: improve reconciliate_jar template.

This commit is contained in:
Mono Mono 2024-07-13 17:38:12 -05:00
parent 3570af7b60
commit f9ee2ad9c2
2 changed files with 27 additions and 2 deletions

View File

@ -1,2 +1,28 @@
<!doctype html>
{{ summary.total }}
{% if summary.total %}
<div class="reconciliate_jar summary">
<h2>Pagos No reconciliados</h2>
<table>
<thead>
<th><td>Fecha</td>Monto</th>
{% for payment in summary.payments %}
<tr><td>payment.date_time</td><td>payment.amount</td></tr>
{% endfor %}
</thead>
{{ summary.total }}
</div>
<form method="POST">
<table style="border: solid 1px blue; margin: 10px">
{% csrf_token %}
{{ form.as_table }}
</table>
<br/><button name="form" type="submit" >Comprar</button>
</form>
{% else %}
<div class="reconciliate_jar information noform">
<h2>No hay pagos registrados.</h2>
</div>
{% endif %}

View File

@ -76,7 +76,6 @@ def reconciliate_jar(request):
form = ReconciliationJarForm()
summary = Payment.get_reconciliation_jar_summary()
# raise Exception(Payment.get_reconciliation_jar_summary().payments)
return render(
request,
"don_confiao/reconciliate_jar.html",