fix: agregar codigosucursal al endpoint de ventas en automation
TNS requiere ?codigosucursal= en /v2/facturacion/Ventas/Crear igual que en RdaPaciente/Insertar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
6950e5aaed
commit
2525e053bf
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user