From 7052d8bc90cb3bcb32a5d2ce5adc23a0c9434fc9 Mon Sep 17 00:00:00 2001 From: Administrator Date: Fri, 9 Oct 2026 13:26:40 -0500 Subject: [PATCH] Actualizar backend/main.py --- backend/main.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/backend/main.py b/backend/main.py index 20de570..f231df3 100644 --- a/backend/main.py +++ b/backend/main.py @@ -276,6 +276,23 @@ def get_saldo_pendiente(tipo_cuota: str = Query("1° Cuota")): raise HTTPException(status_code=500, detail=str(e)) +# ── FACTURACION (Ingresos - Notas de Crédito) ────────────────────────────── +@app.get("/api/facturacion") +def get_facturacion(ano: str = Query("TODOS"), mes: str = Query("TODOS"), cuota: str = Query("TODOS")): + try: + return services.facturacion(ano, mes, cuota) + except Exception as e: + raise HTTPException(status_code=500, detail=str(e)) + + +@app.get("/api/facturacion/cuotas") +def get_facturacion_cuotas(): + try: + return services.facturacion_cuotas() + except Exception as e: + raise HTTPException(status_code=500, detail=str(e)) + + # ── GUARDAR COSTOS ───────────────────────────────────────────────────────── from fastapi import Body