Actualizar backend/modules/ventas/logic.py

This commit is contained in:
2026-09-10 12:37:38 -05:00
parent 9bb1039977
commit 72a613a4f9

View File

@@ -150,7 +150,7 @@ class VentasLogic:
# ========================================================================= # =========================================================================
# OBTENCIÓN DE DETALLE POR VENDEDOR (LÓGICA PURA) # 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: try:
key_mes = f"{int(mes_numero):02d}-{ano}" key_mes = f"{int(mes_numero):02d}-{ano}"
lista_raw = self.data_manager.historico_pendientes.get(key_mes, []) lista_raw = self.data_manager.historico_pendientes.get(key_mes, [])
@@ -307,6 +307,9 @@ class VentasLogic:
if _mk.endswith('.0'): _mk = _mk[:-2] if _mk.endswith('.0'): _mk = _mk[:-2]
_fov_chk = getattr(self.data_manager, '_fecha_canc_overrides', None) or {} _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 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') raw_mat = d.get('num_matricula')
mat_id = "" mat_id = ""