Actualizar backend/core/data_manager.py
This commit is contained in:
@@ -450,7 +450,7 @@ class DataManager:
|
|||||||
dsc_vendedor ASC
|
dsc_vendedor ASC
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def ejecutar_consulta_ventas(self, ano, mes, sede="TODOS", programa="TODOS"):
|
def ejecutar_consulta_ventas(self, ano, mes, sede="TODOS", programa="TODOS", excluir_ret=False):
|
||||||
try:
|
try:
|
||||||
key_mes = f"{int(mes):02d}-{ano}"
|
key_mes = f"{int(mes):02d}-{ano}"
|
||||||
lista_raw = self.historico_pendientes.get(key_mes, [])
|
lista_raw = self.historico_pendientes.get(key_mes, [])
|
||||||
@@ -604,6 +604,9 @@ class DataManager:
|
|||||||
estado_row = str(row[13]).strip().upper() if len(row) > 13 and row[13] else ""
|
estado_row = str(row[13]).strip().upper() if len(row) > 13 and row[13] else ""
|
||||||
if estado_row == "RET" and not saldos_ok:
|
if estado_row == "RET" and not saldos_ok:
|
||||||
continue
|
continue
|
||||||
|
# En VENTAS (excluir_ret): los RET NO cuentan aunque hayan pagado.
|
||||||
|
if excluir_ret and estado_row == "RET":
|
||||||
|
continue
|
||||||
|
|
||||||
# ¿Pagó la 1° cuota en el MES del filtro?
|
# ¿Pagó la 1° cuota en el MES del filtro?
|
||||||
pago_en_fecha_correcta = False
|
pago_en_fecha_correcta = False
|
||||||
|
|||||||
Reference in New Issue
Block a user