diff --git a/backend/modules/ventas/logic.py b/backend/modules/ventas/logic.py index 0a30bcb..91f9194 100644 --- a/backend/modules/ventas/logic.py +++ b/backend/modules/ventas/logic.py @@ -150,7 +150,7 @@ class VentasLogic: # ========================================================================= # OBTENCIÓN DE DETALLE POR VENDEDOR (LÓGICA PURA) # ========================================================================= - def obtener_detalle_vendedor(self, vendedor, ano, mes_numero): + def obtener_detalle_vendedor(self, vendedor, ano, mes_numero, excluir_ret=False): try: key_mes = f"{int(mes_numero):02d}-{ano}" lista_raw = self.data_manager.historico_pendientes.get(key_mes, []) @@ -307,6 +307,9 @@ class VentasLogic: if _mk.endswith('.0'): _mk = _mk[:-2] _fov_chk = getattr(self.data_manager, '_fecha_canc_overrides', None) or {} if estado not in ['ALU', 'PRE', 'RET'] and _mk not in _fov_chk: continue + # En VENTAS (excluir_ret): los RET NO aparecen aunque hayan pagado. + if excluir_ret and estado == "RET": + continue raw_mat = d.get('num_matricula') mat_id = ""