Correccion para que al entrar a un cliente nuevo desde el mapa nos cargue los datos ya guardados

This commit is contained in:
2024-01-29 12:55:54 -06:00
parent bd65cbc4c7
commit 9bd7df8a16
4 changed files with 11 additions and 8 deletions

View File

@@ -426,7 +426,6 @@ Sub mandaPendientes
cuestionarioTexto = $"${cuestionarioTexto}|${cuest.GetString("Q_IDPREGUNTA")}|${cuest.GetString("Q_PREGUNTA")}|${cuest.GetString("Q_IDRESPUESTA")}|${cuest.GetString("Q_RESPUESTA")}"$
Next
End If
cmd.Initialize
cmd.Name = "guardaClienteGeocerca2_MARDS"
cmd.Parameters = Array As Object(c.GetString("CAT_CL_CODIGO"), fechaCaptura, Subs.traeUsuarioDeBD, c.GetString("CAT_CL_LAT"), c.GetString("CAT_CL_LONG"), l_ruta.text, Subs.traeAlmacen, c.GetString("LAT_CENSADOR"), c.GetString("LON_CENSADOR"), motivo, comentario, cuestionarioTexto)

View File

@@ -98,11 +98,7 @@ Sub B4XPage_Appear
et_atiende.Text = ""
et_telefono.Text = ""
et_email.Text = ""
sTime=DateTime.Time(DateTime.Now)
no_cliente= "NC" & sTime & no_ruta
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(no_cliente))
Log(no_cliente)
Log($"CargarCliente: ${cargarCliente}"$)
reqManager.Initialize(Me, Starter.server)
If Not(Starter.gps.GPSEnabled) Then
@@ -116,8 +112,10 @@ Sub B4XPage_Appear
cb_giro.SetItems(losGiros)
B_FOTO.Enabled = True
If cargarCliente Then
Log("Cargamos cliente")
Private cf As Cursor = B4XPages.MainPage.skmt.ExecQuery($"select * from HIST_FOTO_CLIENTE where codigo In (Select cuenta from cuentaa)"$)
Private cc As Cursor = B4XPages.MainPage.skmt.ExecQuery("select * from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
Log(cc.RowCount)
If cc.RowCount > 0 Then
cc.Position = 0
fototomada = ""
@@ -135,6 +133,12 @@ Sub B4XPage_Appear
Log($"${losGiros.IndexOf(cc.GetString("CAT_CL_GIRO"))}, ${losGiros}, ${cc.GetString("CAT_CL_GIRO")}"$)
cb_giro.SelectedIndex = losGiros.IndexOf(cc.GetString("CAT_CL_GIRO"))
End If
Else
sTime=DateTime.Time(DateTime.Now)
no_cliente= "NC" & sTime & no_ruta
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(no_cliente))
Log(no_cliente)
End If
b_ubicacion.Text = "Buscando ubicación ..."
b_guardar.Visible = False

View File

@@ -753,7 +753,7 @@ Version=12.5
#Region Project Attributes
#ApplicationLabel: Mariana Censos
#VersionCode: 1
#VersionName: 4.01.25
#VersionName: 4.01.29
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False

View File

@@ -49,6 +49,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=6,9,11,12,13,14,16,17
ModuleClosedNodes9=1,5
NavigationStack=Subs,logJobDoneResultados,1234,0,Subs,list2string,1308,0,Subs,traeGirosLista,1270,0,Subs,guardaAppInfo,1311,0,C_Principal,Class_Globals,0,0,C_Principal,B4XPage_Created,251,0,C_Principal,CARGA_Click,1040,0,C_Principal,cargar_Click,505,0,B4XMainPage,B4XPage_Created,124,3,C_Principal,JobDone,622,6
NavigationStack=C_Principal,CARGA_Click,1040,0,C_Principal,cargar_Click,505,0,C_Principal,JobDone,632,6,B4XMainPage,B4XPage_Created,84,3,C_Cliente,mandaPendientes,427,0,C_Cliente,ajustaTamano,783,0,C_Cliente,B4XPage_Appear,317,0,Visual Designer,clienteDatos.bal,-100,2,C_NuevoCliente,ajustaTamano,553,0,C_NuevoCliente,B4XPage_Appear,107,6
SelectedBuild=0
VisibleModules=2,14,6,9,4,8,5,15,7,16