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