diff --git a/app/routes/automation.py b/app/routes/automation.py index b734be9..031bb1e 100644 --- a/app/routes/automation.py +++ b/app/routes/automation.py @@ -740,7 +740,7 @@ async def run_automation( and int(v[0].get("NUM_FACTURA") or 0) != 0} resultado["paso4_ventas"]["excluidos"] = len(grupos_vta_all) - len(grupos_vta) - endpoint_venta = f"{TNS_BASE}/v2/facturacion/Ventas/Crear" + endpoint_venta = f"{TNS_BASE}/v2/facturacion/Ventas/Crear?codigosucursal={api_sucursal or '00'}" if "ventas" in pasos_set: async with httpx.AsyncClient(timeout=timeout) as client: for id_rec, grupo_rows in grupos_vta.items():