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: