-VERSION 5.07.05

- Se quito en duro la ruta y almacen para el trendSpending (r:238, almacen:2)
This commit is contained in:
2025-07-05 14:36:35 -06:00
parent 32ba186a60
commit 672953f0b4
5 changed files with 24 additions and 21 deletions

View File

@@ -29,14 +29,14 @@ Public Sub Initialize (vCallback As Object, vEventName As String, db As SQL) As
CallBack = vCallback
tsdb = db
Private mx As Map = traeInfoTrendSpending
Log(mx)
' LogColor(mx, Colors.red)
TS_RMI = Regex.Split(",", mx.Get("RMI"))
TS_DESCUENTOS = Regex.Split(",", mx.Get("DESCUENTOS"))
TS_BONIFICACIONES = Regex.Split(",", mx.Get("BONIFICACIONES"))
Log(">>>>>>>>>>>>> TRENDSPENDING: " & mx)
Log("RMI: " & TS_RMI(0) & "|" & TS_RMI(1))
Log("DESCUENTOS: " & TS_DESCUENTOS(0) & "|" & TS_DESCUENTOS(1))
Log("BONIFICACIONES: " & TS_BONIFICACIONES(0) & "|" & TS_BONIFICACIONES(1))
LogColor(">>>>>>>>>>>>> TRENDSPENDING: " & mx, Colors.red)
LogColor("RMI: " & TS_RMI(0) & "|" & TS_RMI(1), Colors.red)
LogColor("DESCUENTOS: " & TS_DESCUENTOS(0) & "|" & TS_DESCUENTOS(1), Colors.red)
LogColor("BONIFICACIONES: " & TS_BONIFICACIONES(0) & "|" & TS_BONIFICACIONES(1), Colors.red)
Return Me
End Sub
@@ -321,16 +321,17 @@ Sub traeBonificacionesMaximas(tipo As String, clienteId As String, id As String,
Private tsMaximas As Int = 100000
Private tsRestantes As String = 0
Private tsMonto As String
LogColor($"${TS_BONIFICACIONES(0)} - ${TS_BONIFICACIONES(1)} - ${traeAcumuladoHoyTS("bonificaciones")}"$, Colors.Red)
If tipo.ToUpperCase = "BONIFICACIONES" Then
tsMonto = NumberFormat2(traeMontoBonificacion(id, promoId), 1, 2, 2, False)
tsRestantes = (TS_BONIFICACIONES(0) - TS_BONIFICACIONES(1) - traeAcumuladoHoyTS("bonificaciones")) ' Traemos monto restante de Trend Spending para bonificaciones.
End If
' Log($"tsMonto: ${tsMonto}"$)
' Log($"tsRestantes: ${tsRestantes}"$)
' Log($"laCant: ${laCant}"$)
Log($"tsMonto: ${tsMonto}"$)
Log($"tsRestantes: ${tsRestantes}"$)
Log($"laCant: ${laCant}"$)
If tsMonto > 0 Then
tsMaximas = Floor(tsRestantes / (tsMonto * laCant))
' Log(">>> tsMaximas: " & tsMaximas)
Log(">>> tsMaximas: " & tsMaximas)
End If
Return tsMaximas
End Sub
@@ -363,7 +364,7 @@ End Sub
' se agoto el presupuesto.
' Aunque si hay suficiente para mostrar algunas promos ... pues que si las muestre.
Sub maxPromosPorProdsVariables(idProdsVariables As List, promo As String)As Int
Private logger As Boolean = False
Private logger As Boolean = True
Private Maxs As Int = 100000
Private prodsVariablesXPresupuestoBonificaciones As List
Private prodsVariablesRequeridos As Int = traeProdsVariablesRequeridos(promo)
@@ -375,7 +376,7 @@ Sub maxPromosPorProdsVariables(idProdsVariables As List, promo As String)As Int
If logger Then Log(">> Monto Bonificacion: " & traeMontoBonificacion(idProdsVariables.Get(i), promo))
Private maxProds As Int = traeBonificacionesMaximas("bonificaciones", traeCliente, idProdsVariables.Get(i), prodsVariablesRequeridos, promo)
prodsVariablesXPresupuestoBonificaciones.Add(maxProds)
if logger then LogColor(">> Max prods x Bonificaciones: " & maxProds, Colors.blue)
If logger Then LogColor(">> Max prods x Bonificaciones: " & maxProds, Colors.blue)
Next
prodsVariablesXPresupuestoBonificaciones.Sort(True)
If prodsVariablesXPresupuestoBonificaciones.Size > 0 Then