view: improve reconciliate_jar.
This commit is contained in:
parent
74d2e0d234
commit
08deb9d4ec
@ -48,6 +48,6 @@ class ReconciliationJarForm(forms.ModelForm):
|
|||||||
'cash_taken',
|
'cash_taken',
|
||||||
'cash_discrepancy',
|
'cash_discrepancy',
|
||||||
]
|
]
|
||||||
# widgets = {
|
widgets = {
|
||||||
# 'date_time': DateTimeInput(attrs={'type': 'datetime-local'})
|
'date_time': DateTimeInput(attrs={'type': 'datetime-local'})
|
||||||
# }
|
}
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 5.0.6 on 2024-07-13 22:39
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('don_confiao', '0021_rename_reconciler_reconciliationjar_reconcilier'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='payment',
|
||||||
|
name='reconciliation_jar',
|
||||||
|
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='don_confiao.reconciliationjar'),
|
||||||
|
),
|
||||||
|
]
|
@ -106,6 +106,7 @@ class Payment(models.Model):
|
|||||||
ReconciliationJar,
|
ReconciliationJar,
|
||||||
null=True,
|
null=True,
|
||||||
default=None,
|
default=None,
|
||||||
|
blank=True,
|
||||||
on_delete=models.RESTRICT
|
on_delete=models.RESTRICT
|
||||||
)
|
)
|
||||||
description = models.CharField(max_length=255, null=True, blank=True)
|
description = models.CharField(max_length=255, null=True, blank=True)
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
{% if summary.total %}
|
{% if summary.total %}
|
||||||
<div class="reconciliate_jar summary">
|
<div class="reconciliate_jar summary" style="border: solid 1px brown; margin: 10px">
|
||||||
<h2>Pagos No reconciliados</h2>
|
<h2>Pagos No reconciliados</h2>
|
||||||
<table>
|
<table style="border: solid 1px blue; margin: 10px">
|
||||||
<thead>
|
<thead>
|
||||||
<th><td>Fecha</td>Monto</th>
|
<tr><th>Fecha</th><th>Monto</th></tr>
|
||||||
{% for payment in summary.payments %}
|
|
||||||
<tr><td>payment.date_time</td><td>payment.amount</td></tr>
|
|
||||||
{% endfor %}
|
|
||||||
</thead>
|
</thead>
|
||||||
{{ summary.total }}
|
<tbody>
|
||||||
|
{% for payment in summary.payments %}
|
||||||
|
<tr><td>{{ payment.date_time }}</td><td>{{ payment.amount }}</td></tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr><th>Total</th><td>{{ summary.total }}</td></tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<table style="border: solid 1px blue; margin: 10px">
|
<table style="border: solid 1px blue; margin: 10px">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_table }}
|
{{ form.as_table }}
|
||||||
</table>
|
</table>
|
||||||
<br/><button name="form" type="submit" >Comprar</button>
|
<br/><button name="form" type="submit" >Recoger dinero</button>
|
||||||
</form>
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="reconciliate_jar information noform">
|
<div class="reconciliate_jar information noform">
|
||||||
|
Loading…
Reference in New Issue
Block a user