- VERSION 5.12.5

- Se agregó que si no hay presupuesto de bonificaciones, el apartado de PROMOS no aparezca al entrar a productos.
- Se agrego en MAPA_RUTAS que ponga los globitos dinamicamente (faltaba el rojo)
This commit is contained in:
2025-12-08 13:46:58 -06:00
parent 7a88acaf4c
commit 72ce7c8806
7 changed files with 28 additions and 23 deletions

View File

@@ -239,8 +239,21 @@ Sub B4XPage_Appear
' Log(Starter.tipov)
c = Starter.skmt.ExecQuery("select count(*) as hayPromos from promos_comp")
c.Position = 0
Private mx As Map = ts.traeInfoTrendSpending
TS_RMI = Regex.Split(",", mx.Get("RMI"))
TS_DESCUENTOS = Regex.Split(",", mx.Get("DESCUENTOS"))
TS_BONIFICACIONES = Regex.Split(",", mx.Get("BONIFICACIONES"))
Dim bonificacionesDisp As String = TS_BONIFICACIONES(0)
Log(">>>>>>>>>>>>> TRADESPENDING: " & 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))
Log("revisaImpresa: " & Subs.revisaImpresa)
If c.GetInt("hayPromos") > 0 And Subs.traeCliente <> 0 And Subs.revisaImpresa = False Then
Log("bonificacionesDisp: " & bonificacionesDisp)
If bonificacionesDisp = 0 Then ToastMessageShow("¡No hay presupuesto para promociones!", False)
If bonificacionesDisp > 0 And c.GetInt("hayPromos") > 0 And Subs.traeCliente <> 0 And Subs.revisaImpresa = False Then
lv_catalogos.AddSingleLine("PROMOS")
End If
c.Close
@@ -286,14 +299,6 @@ Sub B4XPage_Appear
End If
If B4XPages.MainPage.cliente.la_cuenta.text = "0" Then b_rmi.Visible = False
' Log(Starter.tipov)
Private mx As Map = ts.traeInfoTrendSpending
TS_RMI = Regex.Split(",", mx.Get("RMI"))
TS_DESCUENTOS = Regex.Split(",", mx.Get("DESCUENTOS"))
TS_BONIFICACIONES = Regex.Split(",", mx.Get("BONIFICACIONES"))
Log(">>>>>>>>>>>>> TRADESPENDING: " & 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))
End Sub
Sub PCLV_AddProds

Binary file not shown.

View File

@@ -917,7 +917,7 @@ Version=12.8
#Region Project Attributes
#ApplicationLabel: Kelloggs Venta
#VersionCode: 3000
#VersionName: 5.11.26
#VersionName: 5.12.5
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#BridgeLogger:true
@@ -936,7 +936,6 @@ Version=12.8
'222543
' Version que estaba en la tabla CAT_VERSION antes -> 2.95
' 5.08.30 --> corrige que en la barra de busqeda en productos no hacia nada!

View File

@@ -100,6 +100,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=Subs,procesaPromocion,1284,6,Subs,alcanzanLosVariablesParaPromo,1191,0,Subs,restaFijosPromo,1175,0,Subs,traeMaxPromos,1237,0,DBRequestManager,HandleJob,251,0,C_TrendSpending,traeBonificacionesMaximas,350,0,C_Promos,Class_Globals,62,0,C_Productos,Class_Globals,93,0,Promociones,Class_Globals,13,0,C_Promos,Descripcion,0,0
NavigationStack=C_Principal,B4XPage_Appear,595,0,Subs,revisaMaxPromosProdsFijosPorInventario,1393,1,Subs,procesaPromocion,1256,1,C_TrendSpending,traeMontoBonificacion,370,1,C_TrendSpending,traeBonificacionesMaximas,363,0,kms_helperSubs,RD_Init,105,0,C_Productos,B4XPage_Appear,235,6,MAPA_RUTAS,CreateBitmapWithNumber,363,0,MAPA_RUTAS,MapFragment1_Ready,223,0,B4XMainPage,B4XPage_Created,128,0
SelectedBuild=0
VisibleModules=31,1,12,3,32,13,14,19,16
VisibleModules=31,1,12,3,32,13,14,19,16,26,28

View File

@@ -186,9 +186,9 @@ Sub MapFragment1_Ready
Next
c2 .Close
End If
'''''''---------------------------- MARKER ROJO - NO VENTA
If rojo =1 Or todos = 1 Then
c3.IsInitialized
c3=Starter.skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT ,CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_NOMBRE <>'VENTA ABORDO' AND CAT_CL_CODIGO In (Select NV_CLIENTE from NOVENTA ) AND CAT_CL_CODIGO NOT IN (Select PE_CLIENTE from PEDIDO) and CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = 'DIA_VISITA')order by CAT_CL_NUM_SERIEFISICO")
@@ -200,7 +200,8 @@ Sub MapFragment1_Ready
CODIGO=c3.GetString("CAT_CL_CODIGO")
Tienda= c3.GetString("CAT_CL_NOMBRE")
NumSerie=c3.GetInt("CAT_CL_NUM_SERIEFISICO")
MARK_ROJO = gmap.AddMarker3(LatitudRU,LongitudRU,CODIGO, LoadBitmap(File.DirAssets, "marker-rojo-" & NumSerie &".png"))
' MARK_ROJO = gmap.AddMarker3(LatitudRU,LongitudRU,CODIGO, LoadBitmap(File.DirAssets, "marker-rojo-" & NumSerie &".png"))
MARK_ROJO = gmap.AddMarker3(LatitudRU, LongitudRU, CODIGO, CreateBitmapWithNumber(LoadBitmap(File.DirAssets, "marker-rojo.png"), NumSerie))
MARK_ROJO.Snippet = Tienda
Next
c3.Close

View File

@@ -1259,9 +1259,9 @@ Sub procesaPromocion(idPromo As String, cliente As String) As Map 'ignore
Private thisLog As Boolean = True 'Si es verdadero, muestra los logs de este sub.
Private inicioContador As String = DateTime.Now
Private mp As Int = 0
If thisLog Then LogColor($"****************************************************************"$, Colors.red)
If thisLog Then LogColor($"********* Iniciamos revision de Promo ${idPromo} *********"$, Colors.red)
If thisLog Then LogColor($"****************************************************************"$, Colors.red)
If thisLog Then LogColor($"****************************************************************"$, Colors.RGB(142,0,255))
If thisLog Then LogColor($"********* Iniciamos revision de Promo ${idPromo} *********"$, Colors.RGB(142,0,255))
If thisLog Then LogColor($"****************************************************************"$, Colors.RGB(142,0,255))
Try
'Obtenemos el mapa con toda la info de la promoción.
Private pm As Map = traePromo(idPromo, cliente)
@@ -1395,9 +1395,9 @@ Sub revisaMaxPromosProdsFijosPorInventario(pm As Map) As Int
If thisLog Then LogColor($" prodsFijosPiezasReq=${prodsFijosPiezas}"$, Colors.Blue)
' If thisLog Then LogColor($" invFijoXpromo=${invFijoXpromo}"$, Colors.Blue)
If thisLog Then LogColor(" >>>>>> T: " & t, Colors.Magenta)
LogColor(" ***********************************************************************", Colors.red)
LogColor($" ****** MAX PROMOS X INV DE PRODS FIJOS (${pm.get("id")}): "$ & t.Get(0) & " ******", Colors.red)
LogColor(" ***********************************************************************", Colors.red)
LogColor(" ***********************************************************************", Colors.RGB(156,0,0))
LogColor($" ****** MAX PROMOS X INV DE PRODS FIJOS (${pm.get("id")}): "$ & t.Get(0) & " ******", Colors.RGB(156,0,0))
LogColor(" ***********************************************************************", Colors.RGB(156,0,0))
If thisLog Then LogColor($"============ TERMINA MAX PROMOS X PRODS FIJOS X INV ========"$, Colors.RGB(176,0,0))
Return t.Get(0) 'Regresamos el resultado mas pequeño.
End Sub

View File

@@ -372,7 +372,7 @@ End Sub
' - Si CAT_DP_PRECIOB es 1, la bonificacion es: Precio original - precio de venta.
' - Si CAT_DP_PRECIOB es 0, la bonificacion es: Precio original.
Sub traeMontoBonificacion(id As String, precio As String, promoId As String) As String
Private thisLog As Boolean = False
Private thisLog As Boolean = True
If thisLog Then LogColor($" ============ INICIA MONTO BONIFICACION (${id}) ========"$, Colors.RGB(151,0,171))
If thisLog Then LogColor($" ###### ${promoId}, ${precio}, ${id}"$, Colors.Magenta)
Private tsMonto As String = 0