From 29621ab4830dc7de4a77377a0e647a97c0baf2f4 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 23 Sep 2026 11:08:00 -0500 Subject: [PATCH] Actualizar backend/modules/cobranza/processor.py --- backend/modules/cobranza/processor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/modules/cobranza/processor.py b/backend/modules/cobranza/processor.py index 313f846..51e282d 100644 --- a/backend/modules/cobranza/processor.py +++ b/backend/modules/cobranza/processor.py @@ -416,8 +416,9 @@ class CobranzaProcessor: mapa_programa = {} mapa_sectorista = {} # <-- NUEVO MAPA PARA CORREGIR ASESORES - # Sectorista puede venir con varios separados por coma (multi). Vacío/TODOS = todos. - _sec_set = {s.strip() for s in str(sectorista_filtro or "TODOS").split(",") if s.strip()} + # Sectorista puede venir con varios separados por pipe (multi). Vacío/TODOS = todos. + # Se usa "|" porque los nombres contienen coma (APELLIDO, NOMBRE). + _sec_set = {s.strip() for s in str(sectorista_filtro or "TODOS").split("|") if s.strip()} _sec_all = (not _sec_set) or ("TODOS" in _sec_set) # Sede/Programa filtro también multi (coma). Vacío/TODOS = todos. _sede_set = {s.strip().upper() for s in str(sede_filtro or "TODOS").split(",") if s.strip()} @@ -683,8 +684,8 @@ class CobranzaProcessor: mapa_tc = {} mapa_programa_frec = {} - # Sectorista multi (coma). Vacío/TODOS = todos. - _sec_set = {s.strip() for s in str(sectorista_filtro or "TODOS").split(",") if s.strip()} + # Sectorista multi (pipe, porque los nombres tienen coma). Vacío/TODOS = todos. + _sec_set = {s.strip() for s in str(sectorista_filtro or "TODOS").split("|") if s.strip()} _sec_all = (not _sec_set) or ("TODOS" in _sec_set) for fila in cronograma_raw: