editar rendicion fix

This commit is contained in:
2026-03-21 02:46:46 -03:00
parent 535f5f0a0a
commit 34a902fdff
2 changed files with 11 additions and 11 deletions

View File

@@ -34,9 +34,9 @@ services:
```
# TODO general:
- hacer que trabajador acompañante solo muestre trabajadores en el mismo modulo
- separar productos para tiendas
- limpiar requirements.txt
- hacer que trabajador acompañante solo muestre trabajadores en el mismo modulo
- hacer placeholders funcionales (si dice 0 que el sistema lea 0 no null)
- mostrar rendiciones antiguas
- hacer como un hub del trabajador qu permita ver antiguos y crear uno nuevo

View File

@@ -300,7 +300,7 @@
<label class="form-label">Módulo</label>
<select class="form-select" name="modulo_id" required>
{% for mod in modulos %}
<option value="{{ mod[0] }}" {% if mod[0] == rendicion[13] %}selected{% endif %}>{{ mod[1] }}</option>
<option value="{{ mod[0] }}" {% if mod[0] == rendicion[14] %}selected{% endif %}>{{ mod[1] }}</option>
{% endfor %}
</select>
</div>
@@ -308,7 +308,7 @@
<label class="form-label">Trabajador</label>
<select class="form-select" name="worker_id" required>
{% for w in workers %}
<option value="{{ w[0] }}" {% if w[0] == rendicion[11] %}selected{% endif %}>{{ w[1] }}</option>
<option value="{{ w[0] }}" {% if w[0] == rendicion[12] %}selected{% endif %}>{{ w[1] }}</option>
{% endfor %}
</select>
</div>
@@ -317,7 +317,7 @@
<select class="form-select" name="companion_id">
<option value="">Sin acompañante</option>
{% for w in workers %}
<option value="{{ w[0] }}" {% if w[0] == rendicion[12] %}selected{% endif %}>{{ w[1] }}</option>
<option value="{{ w[0] }}" {% if w[0] == rendicion[13] %}selected{% endif %}>{{ w[1] }}</option>
{% endfor %}
</select>
</div>
@@ -339,22 +339,22 @@
<input type="text" class="form-control" id="edit_credito_{{ rendicion[0] }}" name="venta_credito" value="{{ '{:,.0f}'.format(rendicion[6] or 0).replace(',', '.') }}" oninput="calcTotalEdit({{ rendicion[0] }})">
</div>
</div>
<div class="col-md-4">
<div class="col-md-3">
<label class="form-label">Mercado Pago</label>
<div class="input-group">
<span class="input-group-text">$</span>
<input type="text" class="form-control money-input" id="edit_mp_{{ rendicion[0] }}" name="venta_mp" value="{{ rendicion[6] }}" oninput="calcTotalEdit({{ rendicion[0] }})" required>
<input type="text" class="form-control money-input" id="edit_mp_{{ rendicion[0] }}" name="venta_mp" value="{{ '{:,.0f}'.format(rendicion[7] or 0).replace(',', '.') }}" oninput="calcTotalEdit({{ rendicion[0] }})" required>
</div>
</div>
<div class="col-md-4">
<div class="col-md-3">
<label class="form-label">Efectivo</label>
<div class="input-group">
<span class="input-group-text">$</span>
<input type="text" class="form-control money-input" id="edit_efectivo_{{ rendicion[0] }}" name="venta_efectivo" value="{{ rendicion[7] }}" oninput="calcTotalEdit({{ rendicion[0] }})" required>
<input type="text" class="form-control money-input" id="edit_efectivo_{{ rendicion[0] }}" name="venta_efectivo" value="{{ '{:,.0f}'.format(rendicion[8] or 0).replace(',', '.') }}" oninput="calcTotalEdit({{ rendicion[0] }})" required>
</div>
</div>
{% set total_declarado_actual = (rendicion[5] or 0) + (rendicion[6] or 0) + (rendicion[7] or 0) %}
{% set total_declarado_actual = (rendicion[5] or 0) + (rendicion[6] or 0) + (rendicion[7] or 0) + (rendicion[8] or 0) %}
<div class="col-12 mt-3 bg-body-secondary p-3 rounded border border-secondary-subtle">
<div class="d-flex justify-content-between pb-2">
<span class="text-body-secondary">Total Declarado (Original):</span>
@@ -370,12 +370,12 @@
<label class="form-label text-danger">Gastos</label>
<div class="input-group">
<span class="input-group-text">$</span>
<input type="text" class="form-control money-input border-danger" name="gastos" value="{{ rendicion[8] }}" required>
<input type="text" class="form-control money-input border-danger" name="gastos" value="{{ '{:,.0f}'.format(rendicion[9] or 0).replace(',', '.') }}" required>
</div>
</div>
<div class="col-md-8 mt-4">
<label class="form-label">Observaciones</label>
<textarea class="form-control" name="observaciones" rows="1">{{ rendicion[9] }}</textarea>
<textarea class="form-control" name="observaciones" rows="1">{{ rendicion[10] }}</textarea>
</div>
</div>
</div>