- VERSION 5.04.09

- Se cambiaron mas lados donde se usaba KMTS1
This commit is contained in:
2025-04-10 16:55:44 -06:00
parent c034fdd518
commit 78667e65f1
7 changed files with 50 additions and 20 deletions

View File

@@ -544,6 +544,35 @@ Sub JobDone(Job As HttpJob)
Next
paso1 = 1
End If
'BYPASS EXTRAS
If result.Tag = "traeBypass" Then 'query tag
If result.Rows.Size = 1 Then ' Si hay contraseña de bypass
For Each records() As Object In result.Rows
Starter.passSupervisor = records(result.Columns.Get("BYPASS"))
Next
Log("CONTRASEÑA VALIDA " & Starter.passSupervisor)
b_importarBD.Visible = True
p_importarBDWA.Visible = True
Starter.passSupervisor = user.Text.Trim
Else
Log("CONTRASEÑA INVALIDA")
b_importarBD.Visible = False
p_importarBDWA.Visible = False
End If
End If
'BYPASS IMPORTAR BD WA
If result.Tag = "bypass" Then 'query tag
If result.Rows.Size = 1 Then ' Si hay contraseña de bypass
Log("CONTRASEÑA VALIDA " & Starter.passSupervisor)
b_importarBD.Visible = True
p_importarBDWA.Visible = True
Starter.passSupervisor = user.Text.Trim
Else
Log("CONTRASEÑA INVALIDA")
b_importarBD.Visible = False
p_importarBDWA.Visible = False
End If
End If
End If
Job.Release
End If
@@ -640,6 +669,7 @@ Sub i_engranes_Click
Label1 = ListView1.SingleLineLayout.Label
Label1.TextSize = 20
Label1.TextColor = Colors.Black
et_geocerca.Text = ""sdsf
If user.Text = "KMTS1" Then ListView1.AddSingleLine("http://10.0.0.205:1781")
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"))
@@ -651,13 +681,12 @@ Sub i_engranes_Click
Panel1.Top = (Root.Height/2) - (Panel1.Height/2)
Panel1.Elevation = 100
Panel1.BringToFront
If user.Text.Trim = "KMTS1" Then
b_importarBD.Visible = True
p_importarBDWA.Visible = True
Else
b_importarBD.Visible = False
p_importarBDWA.Visible = False
End If
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "selectBypass" ' Trae la contraseña desde la tabla "BYPASS" en web. (La ultima es KMT2025)
cmd.Parameters = Array As Object(user.Text.Trim)
reqManager.ExecuteQuery(cmd , 0, "bypass")
Log($"${Starter.DBReqServer}, ${user.Text}, ${Subs.traeAlmacen}, ${Subs.traeRuta}"$)
End Sub
Private Sub i_engranes_LongClick
@@ -853,10 +882,10 @@ End Sub
Private Sub et_geocerca_TextChanged (Old As String, New As String)
Private x As Cursor = Starter.skmt.ExecQuery($"select CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'FINDIA_PASS'"$)
Log(New)
Log(New & "|" & Starter.passSupervisor)
If x.RowCount > 0 Then
x.Position = 0
If New = x.GetString("CAT_VA_VALOR") Or New = "KMTS1" Then
If New = x.GetString("CAT_VA_VALOR") Or New = Starter.passSupervisor Then
cb_geocerca.Enabled = True
cb_cartaPorte.Enabled = True
et_maxClientesNuevos.Enabled = True
@@ -873,7 +902,7 @@ Private Sub et_geocerca_TextChanged (Old As String, New As String)
l_maxClientesNuevos.TextColor = Colors.LightGray
et_maxClientesNuevos.TextColor = Colors.LightGray
End If
Else if New = "KMTS1" Then
Else if New = Starter.passSupervisor Then
cb_geocerca.Enabled = True
cb_cartaPorte.Enabled = True
et_maxClientesNuevos.Enabled = True

View File

@@ -4112,19 +4112,19 @@ Private Sub p_pideGeoPass_Click
End Sub
Private Sub b_geopass_Click
If et_geopass.Text.trim = "KMTS1" Then
m_lat = Starter.lat_gps
m_lon = Starter.lon_gps
GPS_LocationChanged(Starter.ubicacionActual)
Starter.skmt.ExecNonQuery($"update kmt_info set CAT_CL_LAT = '${Starter.lat_gps}', CAT_CL_LONG = '${Starter.lon_gps}' where CAT_CL_CODIGO = '${Subs.traeCliente}'"$)
Else
' If et_geopass.Text.trim = "KMTS1" Then
' m_lat = Starter.lat_gps
' m_lon = Starter.lon_gps
' GPS_LocationChanged(Starter.ubicacionActual)
' Starter.skmt.ExecNonQuery($"update kmt_info set CAT_CL_LAT = '${Starter.lat_gps}', CAT_CL_LONG = '${Starter.lon_gps}' where CAT_CL_CODIGO = '${Subs.traeCliente}'"$)
' Else
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "selectBypass" ' Trae la contraseña desde la tabla "BYPASS" en web. (La ultima es KMT2025)
cmd.Parameters = Array As Object(et_geopass.Text.Trim)
reqManager.ExecuteQuery(cmd , 0, "bypass")
Log($"${Starter.DBReqServer}, ${et_geopass.Text}, ${Subs.traeAlmacen}, ${Subs.traeRuta}"$)
End If
' End If
p_pideGeoPass.Visible = False
ime.HideKeyboard
' Log("Guardamos coords")
@@ -4155,7 +4155,7 @@ Sub JobDone(Job As HttpJob)
If result.Tag = "bypass" Then 'query tag
Log("SIN REGISTROS " & result.Rows.Size)
Subs.logJobDoneResultados(result)
If result.Rows.Size = 1 Then
If result.Rows.Size = 1 Then ' Si hay contraseña de bypass
m_lat = Starter.lat_gps
m_lon = Starter.lon_gps
GPS_LocationChanged(Starter.ubicacionActual)

Binary file not shown.

Binary file not shown.

View File

@@ -907,7 +907,7 @@ Version=12.8
#Region Project Attributes
#ApplicationLabel: Kelloggs Venta
#VersionCode: 3000
#VersionName: 5.04.08
#VersionName: 5.04.09
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#BridgeLogger:true

View File

@@ -91,6 +91,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=C_Productos,b_prodMas_Click,639,6,C_Productos,et_pCant_TextChanged,748,6,C_Productos,et_pCant_FocusChanged,846,0,C_Principal,Class_Globals,0,0,C_Principal,cargar_Click,757,0,C_Principal,JobDone,2099,0,DBRequestManager,trackNext,342,0,DBRequestManager,trackInit,333,0,C_Cliente,p_pideGeoPass_Click,4106,0,C_Cliente,b_geopass_Click,4129,6
NavigationStack=B4XMainPage,et_geocerca_TextChanged,865,4,DBRequestManager,trackNext,342,0,DBRequestManager,trackInit,333,0,Diseñador Visual,cliente.bal,-100,1,C_Cliente,p_pideGeoPass_Click,4106,0,C_Cliente,b_geopass_Click,4114,6,B4XMainPage,et_maxClientesNuevos_TextChanged,851,0,B4XMainPage,user_EnterPressed,636,0,B4XMainPage,JobDone,556,6,B4XMainPage,i_engranes_Click,680,4
SelectedBuild=0
VisibleModules=1,28,11,3,29,12,7,9,17

View File

@@ -56,6 +56,7 @@ Sub Process_Globals
Dim pingShell As Boolean = False
Dim errorConnDBReq As Boolean = False
Dim GUID As String = ""
dim passSupervisor as string = ""
End Sub
Sub Service_Create