ui(edo-cuenta): originación concatenada en la subcuenta, no columna aparte

'FRISON T6 FLEX · Renta mensual (01/06/2026)' — la tabla de
movimientos queda en 6 columnas con más aire para la subcuenta.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jorem JuárezandClaude Opus 4.8 committed 2026-08-04 18:03:59 -06:00
1 parent c6311acffb
commit 5e116fb50e
2 files changed
+8 -6

No files matched your search

+6 -5
View File
@@ -222,10 +222,13 @@ def generar_pdf(
if movimientos:
movimientos = _completar_snapshot(movimientos, renglones)
st_nota = _estilo("nota", fontSize=7.5, textColor=_GRIS, leading=9)
filas = [["Fecha", "Subcuenta", "Originación", "Movimiento",
filas = [["Fecha", "Subcuenta", "Movimiento",
"Capital", "Abonado", "Monto"]]
for m in movimientos:
sub = f"{m.get('vehiculo') or ''} · {_tipo_label(m)}"
origen = _fecha_es(m.get("fecha_alta") or "")
if origen:
sub += f" ({origen})"
celda_sub = [Paragraph(sub, st_celda)]
if m.get("nota"):
celda_sub.append(Paragraph(str(m["nota"]), st_nota))
@@ -234,22 +237,20 @@ def generar_pdf(
filas.append([
_fecha_es(m.get("fecha") or ""),
celda_sub,
_fecha_es(m.get("fecha_alta") or "") or "—",
_MOV_LABEL.get(m.get("movimiento") or "", m.get("movimiento") or ""),
_money(cap) if cap is not None else "—",
_money(abo) if abo is not None else "—",
_money(m.get("monto")),
])
t = Table(filas,
colWidths=[19 * mm, 41 * mm, 20 * mm, 21 * mm,
None, None, None],
colWidths=[19 * mm, 58 * mm, 22 * mm, None, None, None],
repeatRows=1)
t.setStyle(TableStyle([
("FONTNAME", (0, 0), (-1, 0), "Helvetica-Bold"),
("FONTSIZE", (0, 0), (-1, -1), 8),
("TEXTCOLOR", (0, 0), (-1, 0), colors.white),
("BACKGROUND", (0, 0), (-1, 0), _ACCENT),
("ALIGN", (4, 0), (-1, -1), "RIGHT"),
("ALIGN", (3, 0), (-1, -1), "RIGHT"),
("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
("ROWBACKGROUNDS", (0, 1), (-1, -1), [colors.white, _FILA_ALT]),
("LINEBELOW", (0, 0), (-1, -1), 0.4, _LINEA),
+2 -1
View File
@@ -69,7 +69,8 @@ def test_pdf_contiene_saldos_y_movimientos():
assert "Abono" in txt and "Mes saldado" in txt
assert "transferencia BBVA" in txt
assert "$6,000.00" in txt
assert "Originación" in txt and "01/06/2026" in txt
assert "(01/06/2026)" in txt # originación en la subcuenta
assert "Originación" not in txt # ya no es columna aparte
assert "$20,000.00" in txt # capital de la subcuenta