diff --git a/B4A/MAPA_RUTAS.bas b/B4A/MAPA_RUTAS.bas index e0270f6..357e758 100644 --- a/B4A/MAPA_RUTAS.bas +++ b/B4A/MAPA_RUTAS.bas @@ -160,6 +160,7 @@ Sub MapFragment1_Ready Dim JavaMapsObject As JavaObject JavaMapsObject = gmap.GetUiSettings JavaMapsObject.RunMethod("setMapToolbarEnabled", Array As Object(True)) + '''''''----------------------------MARKER AZUL - NUEVOS If azul = 1 Or todos = 1 Then ' c.IsInitialized @@ -186,10 +187,11 @@ Sub MapFragment1_Ready ' Log("4") If MARK_AZUL.IsInitialized Then LIST_AZUL.Add(MARK_AZUL) End If - '''''''----------------------------MARKER VERDE + + '''''''----------------------------MARKER VERDE - ACTIVOS If verde = 1 Or todos = 1 Then ' c2.IsInitialized - c2=skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE, CAT_CL_LONG, CAT_CL_LAT, CAT_CL_SECUENCIA from kmt_info where gestion = 0 and CAT_CL_LAT is not null and CAT_CL_LONG is not null and NUEVO <> '1' and CAT_CL_SECUENCIA <> '0' and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0") + c2=skmt.ExecQuery($"select CAT_CL_CODIGO, CAT_CL_NOMBRE, CAT_CL_LONG, CAT_CL_LAT, CAT_CL_SECUENCIA from kmt_info where gestion = 0 And CAT_CL_LAT Is Not Null And CAT_CL_LONG Is Not Null And NUEVO <> '1' And CAT_CL_SECUENCIA <> '0' And CAT_CL_LAT <> 0 And CAT_CL_LONG <> 0"$) Log($"============== Verde Resultados = ${c2.RowCount}"$) For i = 0 To c2.RowCount -1 c2.Position = i @@ -207,7 +209,7 @@ Sub MapFragment1_Ready c.Close End If -' '''''''----------------------------MARKER ROJO - NO VENTA +' '''''''----------------------------MARKER ROJO - CERRADOS If rojo = 1 Or todos = 1 Then ' c3.IsInitialized ' c3 = skmt.ExecQuery($"Select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT, CAT_CL_SECUENCIA from kmt_info @@ -215,7 +217,7 @@ Sub MapFragment1_Ready ' And CAT_CL_LAT <> 0 And CAT_CL_LONG <> 0 and CAT_CL_ESTATUS <> 'Inactivo' and CAT_CL_ESTATUS <> 'Activo'"$) ' Se agrego la condicion de "<> inactivo" para que solo aparezcan los "cerrados permanentes" y no los inactivos. c3 = skmt.ExecQuery($"Select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT, CAT_CL_SECUENCIA from kmt_info where CAT_CL_CODIGO Not like 'N%' and CAT_CL_LAT is not null and CAT_CL_LONG is not null - And CAT_CL_LAT <> 0 And CAT_CL_LONG <> 0 and CAT_CL_ESTATUS = 'Activo' and HV_MOTIVO = 'CERRADO'"$) + And CAT_CL_LAT <> 0 And CAT_CL_LONG <> 0 and CAT_CL_ESTATUS = 'Activo' and HV_MOTIVO = 'CERRADO_XXXXX'"$) Log($"Select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT, CAT_CL_SECUENCIA from kmt_info where CAT_CL_CODIGO Not like 'N%' and CAT_CL_SECUENCIA = 0 and CAT_CL_LAT is not null and CAT_CL_LONG is not null And CAT_CL_LAT <> 0 And CAT_CL_LONG <> 0 and CAT_CL_ESTATUS <> 'Inactivo'"$) Log($"============== Rojo Resultados = ${c3.RowCount}"$) @@ -233,8 +235,8 @@ Sub MapFragment1_Ready c3.Close End If -' '''''''----------------------------MARKER NEGRO - NO VENTA - If pVisitar = 1 Then +' '''''''----------------------------MARKER NEGRO - VISITADOS + If pVisitar = 1 Or todos = 1 Then ' c3.IsInitialized c3 = skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_NOMBRE,CAT_CL_LONG,CAT_CL_LAT, CAT_CL_SECUENCIA from kmt_info where gestion = '11' and CAT_CL_LAT is not null and CAT_CL_LONG is not null and CAT_CL_LAT <> 0 and CAT_CL_LONG <> 0 and CAT_CL_ESTATUS <> 'Inactivo'") Log($"============== Negro Resultados = ${c3.RowCount}"$) diff --git a/B4A/Mariana Censos.b4a b/B4A/Mariana Censos.b4a index 7e170a3..fed1f36 100644 --- a/B4A/Mariana Censos.b4a +++ b/B4A/Mariana Censos.b4a @@ -755,7 +755,7 @@ Version=12.8 #Region Project Attributes #ApplicationLabel: Mariana Censos #VersionCode: 1 - #VersionName: 5.05.27 + #VersionName: 5.06.05 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False diff --git a/B4A/Mariana Censos.b4a.meta b/B4A/Mariana Censos.b4a.meta index 0d33685..432242b 100644 --- a/B4A/Mariana Censos.b4a.meta +++ b/B4A/Mariana Censos.b4a.meta @@ -49,6 +49,6 @@ ModuleClosedNodes6= ModuleClosedNodes7= ModuleClosedNodes8=1 ModuleClosedNodes9=1 -NavigationStack=Subs,traeAlmacen,657,0,B4XMainPage,B4XPage_Created,190,0,Subs,traeUsarIntentBDWA,1332,4,B4XMainPage,B4XPage_Appear,225,0,Subs,importaBDDesdeWhatsApp,1341,6,Starter,JobDone,133,6,Starter,Process_Globals,20,0,Starter,Service_Create,35,0,C_Principal,Class_Globals,0,0,C_Principal,B4XPage_Created,240,0,C_Principal,JobDone,584,0 +NavigationStack=Starter,Service_Create,35,0,C_Principal,Class_Globals,0,0,C_Principal,B4XPage_Created,240,0,C_Principal,JobDone,585,0,B4XMainPage,Class_Globals,77,0,B4XMainPage,B4XPage_Appear,235,0,Subs,importaBDDesdeWhatsApp,1343,6,Subs,traeUsarIntentBDWA,1335,0,MAPA_RUTAS,MapFragment1_Ready,187,6,B4XMainPage,B4XPage_Created,163,0 SelectedBuild=0 VisibleModules=14,2,9,4,8,15,7,16,13,5 diff --git a/B4A/Subs.bas b/B4A/Subs.bas index 7af83ae..68a41c1 100644 --- a/B4A/Subs.bas +++ b/B4A/Subs.bas @@ -1345,13 +1345,16 @@ Sub importaBDDesdeWhatsApp Log($"IMPORTAMOS BD DESDE WA"$) Private tmpBDWA As Boolean = traeUsarIntentBDWA Log("IN: " & in.As(String)) - Log("INTRNT USADO: " & intentUsado) - If Not(in.IsInitialized) Then in = B4XPages.GetNativeParent(B4XPages.MainPage).GetStartingIntent ' Si se usa esta funcion en Mainpage, se pone "Me" en lugar de B4XPages.MainPage. + Log("INTENT USADO: " & intentUsado) +' If Not(in.IsInitialized) Then +' Log(987) + in = B4XPages.GetNativeParent(B4XPages.MainPage).GetStartingIntent ' Si se usa esta funcion en Mainpage, se pone "Me" en lugar de B4XPages.MainPage. +' End If If Not(intentUsado) And in <> Null Then - intentUsado = True - Log(in.As(String)) + Log("IN.DATA: " & in.GetData.As(String)) If in.GetData <> Null Then - Log(333) + intentUsado = True + Log("Hay DB!!") Dim XmlData As String XmlData = in.GetData Try @@ -1361,6 +1364,7 @@ Sub importaBDDesdeWhatsApp LogColor("BD copiada a interna.", Colors.Blue) OutStr.Close If in.As(String).Contains("whatsapp") Then ToastMessageShow("BD cargada desde Whatsapp", False) + Catch Log(LastException) End Try