From b526fe6c067ef08613efd4516f81ecde08c7d393 Mon Sep 17 00:00:00 2001 From: consultoria-as Date: Mon, 19 Jan 2026 04:18:06 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20Corregir=20par=C3=A1metros=20incorrectos?= =?UTF-8?q?=20en=20generaci=C3=B3n=20de=20PDF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - generar_reporte_diario() y generar_reporte_ejecutivo() esperan (ventas, stats) pero se estaba pasando (ventas, ranking, stats) - Esto causaba error "'list' object has no attribute 'get'" - TambiƩn pasar vendedor al reporte diario cuando aplique Co-Authored-By: Claude Opus 4.5 --- sales-bot/app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sales-bot/app.py b/sales-bot/app.py index e2806a5..95072f9 100644 --- a/sales-bot/app.py +++ b/sales-bot/app.py @@ -1008,10 +1008,10 @@ def comando_reporte(): } if tipo == 'ejecutivo': - pdf_content = generar_reporte_ejecutivo(ventas, ranking, stats) + pdf_content = generar_reporte_ejecutivo(ventas, stats) filename = f"reporte_ejecutivo_{datetime.now(TZ_MEXICO).strftime('%Y%m%d')}.pdf" else: - pdf_content = generar_reporte_diario(ventas, ranking, stats) + pdf_content = generar_reporte_diario(ventas, stats) filename = f"reporte_{tipo}_{datetime.now(TZ_MEXICO).strftime('%Y%m%d')}.pdf" # Subir PDF a Mattermost @@ -1074,9 +1074,9 @@ def api_reports_generate(): # Generar PDF if tipo == 'executive': - pdf_content = generar_reporte_ejecutivo(ventas, ranking, stats) + pdf_content = generar_reporte_ejecutivo(ventas, stats) else: - pdf_content = generar_reporte_diario(ventas, ranking, stats) + pdf_content = generar_reporte_diario(ventas, stats, vendedor) # Guardar temporalmente y devolver ID import hashlib