From 047d927224b02d7d21335fc987d358a48f79537d Mon Sep 17 00:00:00 2001 From: Jose Alberto Guerra Ugalde Date: Thu, 18 Apr 2024 18:01:43 -0600 Subject: [PATCH] - Cambios en el codigo de promocion. - Cambios en el codigo del listview de servidores en el engrane --- B4A/B4XMainPage.bas | 2 +- B4A/Durakelo.b4a | 2 +- B4A/Durakelo.b4a.meta | 4 ++-- B4A/MAPA_RUTAS.bas | 2 +- B4A/Subs.bas | 15 ++++++++++----- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/B4A/B4XMainPage.bas b/B4A/B4XMainPage.bas index 03aa225..d23aaca 100644 --- a/B4A/B4XMainPage.bas +++ b/B4A/B4XMainPage.bas @@ -419,7 +419,7 @@ Sub ImageView4_Click Label1 = ListView1.SingleLineLayout.Label Label1.TextSize = 20 Label1.TextColor = Colors.Black - ListView1.AddSingleLine(Starter.DBReqServer) + ListView1.AddSingleLine("http://keymon.lat:1781") c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SERVER")) c.Position =0 E_SERVER.text = c.GetString("CAT_VA_VALOR") diff --git a/B4A/Durakelo.b4a b/B4A/Durakelo.b4a index 630d376..3d3f146 100644 --- a/B4A/Durakelo.b4a +++ b/B4A/Durakelo.b4a @@ -1398,7 +1398,7 @@ Version=12.8 #Region Project Attributes #ApplicationLabel: Durakelo #VersionCode: 1 - #VersionName: 4.04.011ENCU + #VersionName: 4.04.12 ENCU 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False diff --git a/B4A/Durakelo.b4a.meta b/B4A/Durakelo.b4a.meta index a30cd3a..d37de37 100644 --- a/B4A/Durakelo.b4a.meta +++ b/B4A/Durakelo.b4a.meta @@ -73,6 +73,6 @@ ModuleClosedNodes6= ModuleClosedNodes7= ModuleClosedNodes8= ModuleClosedNodes9= -NavigationStack=C_Principal,Subir_Click,600,0,MAPA_RUTAS,Activity_Create,106,0,MAPA_RUTAS,MapFragment1_Ready,214,6,Visual Designer,Cliente.bal,-100,1,C_Principal,connecta_Click,1964,0,C_Principal,Class_Globals,0,0,C_Principal,cargar_Click,938,0,C_Principal,JobDone,1127,6,C_Cliente,B4XPage_Created,179,0,C_Cliente,B4XPage_Appear,253,6,C_Cliente,Class_Globals,27,0 +NavigationStack=Visual Designer,login.bal,-100,2,C_Cliente,cuestionario,1460,0,C_Cliente,B4XPage_CloseRequest,472,0,C_Cliente,B_VENTA_Click,1215,0,C_Cuestionario,agregaPregunta,65,0,C_Cuestionario,Class_Globals,11,0,MAPA_RUTAS,MapFragment1_Ready,120,0,Subs,procesaPromocion,1017,0,Subs,traeMaxPromos,979,6,Subs,traePromo,807,0,Main,Globals,25,0 SelectedBuild=0 -VisibleModules=1,2,10,4,5,6,8,9,11,24,21 +VisibleModules=1,2,10,4,5,6,8,9,11,24,21,23 diff --git a/B4A/MAPA_RUTAS.bas b/B4A/MAPA_RUTAS.bas index ddac56a..7fe3862 100644 --- a/B4A/MAPA_RUTAS.bas +++ b/B4A/MAPA_RUTAS.bas @@ -124,7 +124,7 @@ Sub MapFragment1_Ready Dim JavaMapsObject As JavaObject JavaMapsObject = gmap.GetUiSettings JavaMapsObject.RunMethod("setMapToolbarEnabled", Array As Object(True)) - + '''''''----------------------------MARKER AZUL - POR VISITAR If azul = 1 Or todos = 1 Then diff --git a/B4A/Subs.bas b/B4A/Subs.bas index b9be7c7..5441e7a 100644 --- a/B4A/Subs.bas +++ b/B4A/Subs.bas @@ -968,8 +968,9 @@ End Sub Sub traeMaxPromos(pm As Map) As Int Private thisLog As Boolean = False 'Si es verdadero, muestra los logs de este sub. Private maxPromos As List - Private mp0, mp As String = "0" + Private mp0 As String = "0", mp As String = "0" maxPromos.Initialize + Log("mp:" & maxPromos) Private hccp As Cursor = Starter.skmt.ExecQuery($"select HCCP_CANT from HIST_CLIENTE_CANT_PROMOS where HCCP_CLIENTE = '${traeCliente}' and HCCP_PROMO = '${pm.Get("id")}'"$) ' Log($"select HCCP_CANT from HIST_CLIENTE_CANT_PROMOS where HCCP_CLIENTE = '${traeCliente}' and HCCP_PROMO = '${pm.Get("id")}'"$) ' If hccp.RowCount > 0 Then @@ -981,15 +982,19 @@ Sub traeMaxPromos(pm As Map) As Int If thisLog Then LogColor("==== HISTORICO:"&pm.Get("historico"), Colors.Red) If thisLog Then Log(pm) If pm.Get("historico") = "1" Then maxPromos.Add(pm.Get("maxRecurrente")) 'Si hay historico, agregamos maxRecurrente - maxPromos.Add(pm.Get("maxPromos")) 'Agregamos maxPromos - maxPromos.Add(pm.Get("maxXcliente")) 'Agregamos maxXcliente + If pm.Get("maxPromos") <> Null Then maxPromos.Add(pm.Get("maxPromos")) 'Agregamos maxPromos + If pm.Get("maxXcliente") <> Null Then maxPromos.Add(pm.Get("maxXcliente")) 'Agregamos maxXcliente + Log(hccp.RowCount) If hccp.RowCount > 0 Then 'Agregamos promos HCCP hccp.Position = 0 maxPromos.Add(hccp.GetString("HCCP_CANT")) End If - maxPromos.Sort(True) + Log(maxPromos) + If maxPromos.Size > 0 Then + maxPromos.Sort(True) + mp0 = maxPromos.Get(0) + End If If thisLog Then Log(maxPromos) - mp0 = maxPromos.Get(0) mp = mp0 - traePromosVendidas(pm.Get("id"), traeCliente) If thisLog Then Log($"Max Promos (${mp0}) - promos vendidas (${(traePromosVendidas(pm.Get("id"), traeCliente)).As(Int)}) = ${mp}"$) Return mp 'Regresamos el numero mas pequeño de las opciones.