mirror of
https://github.com/KeymonSoft/DBCheck.git
synced 2026-04-17 19:37:09 +00:00
VERSION 6.03.19
- Correcion en envio de datos de venta y reparto
This commit is contained in:
@@ -102,8 +102,6 @@ Sub Class_Globals
|
|||||||
Dim l_vPedidos2 As Label
|
Dim l_vPedidos2 As Label
|
||||||
Dim l_vNoVenta2 As Label
|
Dim l_vNoVenta2 As Label
|
||||||
Dim i_progress As B4XGifView
|
Dim i_progress As B4XGifView
|
||||||
Dim in As Intent
|
|
||||||
Dim intentUsado As Boolean = False
|
|
||||||
Dim Guna_Reparto As C_Guna_Reparto
|
Dim Guna_Reparto As C_Guna_Reparto
|
||||||
Dim Intmex_Reparto As C_Intmex_Reparto
|
Dim Intmex_Reparto As C_Intmex_Reparto
|
||||||
Dim Marquez_Reparto As C_Marquez_Reparto
|
Dim Marquez_Reparto As C_Marquez_Reparto
|
||||||
@@ -136,6 +134,7 @@ Sub Class_Globals
|
|||||||
Private l_montoaliquidar As Label
|
Private l_montoaliquidar As Label
|
||||||
Private l_rutasP As Label
|
Private l_rutasP As Label
|
||||||
Private l_rutaRep As Label
|
Private l_rutaRep As Label
|
||||||
|
Dim importador As C_ImportaBD
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Initialize
|
Public Sub Initialize
|
||||||
@@ -199,54 +198,23 @@ Sub B4XPage_Created (Root1 As B4XView)
|
|||||||
Marquez.Initialize
|
Marquez.Initialize
|
||||||
Mazapa.Initialize
|
Mazapa.Initialize
|
||||||
Profina.Initialize
|
Profina.Initialize
|
||||||
|
importador.Initialize
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||||
|
|
||||||
Sub B4XPage_Appear
|
Sub B4XPage_Appear
|
||||||
Log("INICIO")
|
Log("INICIO")
|
||||||
If Not(in.IsInitialized) Then in = B4XPages.GetNativeParent(Me).GetStartingIntent
|
' CODIGO PARA INTENT DE IMPORTAR BD DESDE WHATSAPP
|
||||||
If Not(intentUsado) And in <> Null Then
|
' 1. Obtener el Intent del activity padre (Esto SE QUEDA fuera de la clase)
|
||||||
Log(in)
|
Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent
|
||||||
' Dim action As String = in.Action
|
' 2. Pasamos la bolita a la clase
|
||||||
' Log("Action: " & action) ' Ej: "android.intent.action.VIEW"
|
If importador.ProcesarIntent(in) Then
|
||||||
' Dim uri As Object = in.GetData ' Obtiene la URI (content://...)
|
ToastMessageShow("BD importada correctamente", False)
|
||||||
' Log(in.GetData)
|
If importador.EsDeWhatsapp(in) Then B4XPages.SetTitle(Me, "BD cargada desde Whatsapp")
|
||||||
' If uri <> Null Then
|
|
||||||
' Dim uriString As String = uri
|
|
||||||
' Log("URI: " & uriString) ' Ej: "content://com.whatsapp.provider.media/..."
|
|
||||||
' Else
|
|
||||||
' Log("El Intent no tiene URI asociada.")
|
|
||||||
' End If
|
|
||||||
' Dim mimeType As String = in.GetData
|
|
||||||
' Log("MIME Type: " & mimeType) ' Ej: "application/x-sqlite3"
|
|
||||||
' If in.HasExtra("android.intent.extra.STREAM") Then
|
|
||||||
' Dim extraUri As Object = in.GetExtra("android.intent.extra.STREAM")
|
|
||||||
' Log("Extra URI: " & extraUri) ' Ej: "content://..."
|
|
||||||
' Else
|
|
||||||
' Log("No hay extras con android.intent.extra.STREAM")
|
|
||||||
' End If
|
|
||||||
intentUsado = True
|
|
||||||
' Log(in.GetData)
|
|
||||||
If in.GetData <> Null Then
|
|
||||||
Dim XmlData As String
|
|
||||||
XmlData = in.GetData
|
|
||||||
ToastMessageShow(XmlData, False)
|
|
||||||
' Send_Make_somthing(in)
|
|
||||||
' Activity.Finish
|
|
||||||
Try
|
|
||||||
Dim OutStr As OutputStream = File.OpenOutput(File.DirInternal,"kmt.db",False)
|
|
||||||
Dim InStr As InputStream = File.OpenInput("ContentDir",XmlData)
|
|
||||||
File.Copy2(InStr,OutStr)
|
|
||||||
LogColor("BD copiada a interna.", Colors.Blue)
|
|
||||||
OutStr.Close
|
|
||||||
If in.As(String).Contains("whatsapp") Then B4XPages.SetTitle(Me, "BD cargada desde Whatsapp")
|
|
||||||
Catch
|
|
||||||
Log(LastException)
|
|
||||||
End Try
|
|
||||||
' ExitApplication
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
' TERMINA CODIGO DE IMPORTACION
|
||||||
|
|
||||||
' Log($"Existe BD: ${File.Exists(File.DirInternal, "kmt.db") }"$)
|
' Log($"Existe BD: ${File.Exists(File.DirInternal, "kmt.db") }"$)
|
||||||
If File.Exists(File.DirInternal, "kmt.db") Then
|
If File.Exists(File.DirInternal, "kmt.db") Then
|
||||||
If Not(skmt.IsInitialized) Then skmt.Initialize(File.DirInternal,"kmt.db", True)
|
If Not(skmt.IsInitialized) Then skmt.Initialize(File.DirInternal,"kmt.db", True)
|
||||||
@@ -720,7 +688,8 @@ Sub b_enviar_Click
|
|||||||
' envioIzca
|
' envioIzca
|
||||||
Izca.ConfigurarYEnviar("http://keymon.net:1781")
|
Izca.ConfigurarYEnviar("http://keymon.net:1781")
|
||||||
else if empresa.ToUpperCase.Contains("DURAKELO") Then
|
else if empresa.ToUpperCase.Contains("DURAKELO") Then
|
||||||
envioDurakelo
|
' envioDurakelo
|
||||||
|
Durakelo.ConfigurarYEnviar("http://keymon.net:1781")
|
||||||
else if empresa.ToUpperCase.Contains("MARQUEZ") Then
|
else if empresa.ToUpperCase.Contains("MARQUEZ") Then
|
||||||
' envioMarquez
|
' envioMarquez
|
||||||
Marquez.ConfigurarYEnviar("http://keymon.net:1781")
|
Marquez.ConfigurarYEnviar("http://keymon.net:1781")
|
||||||
@@ -955,6 +924,7 @@ Sub p_principal_Click
|
|||||||
p_editaAlmacen.Visible = False
|
p_editaAlmacen.Visible = False
|
||||||
p_editaRuta.Visible = False
|
p_editaRuta.Visible = False
|
||||||
p_clientes.Visible = False
|
p_clientes.Visible = False
|
||||||
|
p_editaUsuario.Visible = False
|
||||||
p_validacion.Visible = False
|
p_validacion.Visible = False
|
||||||
ime.HideKeyboard
|
ime.HideKeyboard
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1220,7 +1190,7 @@ Sub envioGuna 'ignore
|
|||||||
|
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
||||||
d.Position=0
|
d.Position=0
|
||||||
Private cuantos_pedidosc As String = D.GetString("CUANTOS_PEDIDOSC")
|
cuantos_pedidosc = D.GetString("CUANTOS_PEDIDOSC")
|
||||||
d.Close
|
d.Close
|
||||||
|
|
||||||
' ENVIO DE LOS CODIGOS QR
|
' ENVIO DE LOS CODIGOS QR
|
||||||
@@ -1498,7 +1468,7 @@ Sub valida(identificador As String)
|
|||||||
|
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
||||||
d.Position = 0
|
d.Position = 0
|
||||||
Private cuantos_pedidosc As String = D.GetString("CUANTOS_PEDIDOSC")
|
cuantos_pedidosc = D.GetString("CUANTOS_PEDIDOSC")
|
||||||
d.Close
|
d.Close
|
||||||
|
|
||||||
cmd.Initialize
|
cmd.Initialize
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ End Sub
|
|||||||
'You can add more parameters here.
|
'You can add more parameters here.
|
||||||
Public Sub Initialize As Object
|
Public Sub Initialize As Object
|
||||||
' reqManager.Initialize(Me, "http://keymon.lat:1781")
|
' reqManager.Initialize(Me, "http://keymon.lat:1781")
|
||||||
reqManager.Initialize(Me, "http://keymon.net:1781")
|
|
||||||
l_ruta.Initialize("")
|
l_ruta.Initialize("")
|
||||||
L_ABORDO.Initialize("")
|
L_ABORDO.Initialize("")
|
||||||
l_porvisitar.Initialize("")
|
l_porvisitar.Initialize("")
|
||||||
@@ -31,14 +30,13 @@ End Sub
|
|||||||
Private Sub B4XPage_Created (Root1 As B4XView)
|
Private Sub B4XPage_Created (Root1 As B4XView)
|
||||||
Root = Root1
|
Root = Root1
|
||||||
'load the layout to Root
|
'load the layout to Root
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
carga = "SUBIR"
|
|
||||||
enviando = True
|
enviando = True
|
||||||
|
carga = "SUBIR"
|
||||||
almacen = Subs.traeAlmacen
|
almacen = Subs.traeAlmacen
|
||||||
l_ruta.TEXT = Subs.traeRuta
|
l_ruta.TEXT = Subs.traeRuta
|
||||||
Dim fecha As String = DateTime.Date(DateTime.Now)
|
Dim fecha As String = DateTime.Date(DateTime.Now)
|
||||||
@@ -305,127 +303,88 @@ Sub envia
|
|||||||
' S_CP.Text = "VALIDANDO"
|
' S_CP.Text = "VALIDANDO"
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
T4.Initialize("T4", 3000)
|
' T4.Initialize("T4", 3000)
|
||||||
T4.Enabled = True
|
' T4.Enabled = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE DURAKELO")
|
Log("JOBDONE - " & almacen)
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
|
||||||
LogColor($">>>>>>>>>> Llega ${Job.tag} <<<<<<<<<<"$, Colors.Blue)
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
' LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
End If
|
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
End If
|
||||||
If Job.Success = False Then
|
|
||||||
LogColor("############################################", Colors.red)
|
|
||||||
LogColor("#### Error: " & Job.tag & " : " & Job.ErrorMessage, Colors.red)
|
|
||||||
LogColor("############################################", Colors.red)
|
|
||||||
Else
|
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.Green) 'Mod por CHV - 211027
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
|
||||||
If reqManager.reqsList.IndexOf(RESULT.tag) <> -1 Then
|
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(RESULT.tag))
|
|
||||||
LogColor($"*** Quitamos ${RESULT.tag}"$, Colors.Magenta)
|
|
||||||
T4.Initialize("T4", 2000)
|
|
||||||
End If
|
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.red)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
If Not(Job.Success) Then
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
If RESULT.Tag = "ins_pedido" Then 'query tag
|
Else
|
||||||
' For Each records() As Object In RESULT.Rows
|
' 2. Procesamos validaciones
|
||||||
' PB2.Progress = PB2.Progress + 5
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
' Next
|
|
||||||
' PB2.Progress = 100
|
|
||||||
' S_CP.Text = "LISTO"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
If Job.JobName = "DBRequest" Then
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
If RESULT.Tag = "valida_pedido" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
Log(CUANTOSP)
|
|
||||||
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
If cuantos_pedido <= CUANTOSP Then
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
datos_iguales = "ok"
|
||||||
' S_CP.Text = "INFO OK"
|
|
||||||
ToastMessageShow("INFO OK", False)
|
|
||||||
Else
|
Else
|
||||||
' S_CP.Text = "ENVIAR DATOS (K-2)"
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
ToastMessageShow($"No se cargo bien la info de pedido.${CRLF}Envíe nuevamente: "$ & CUANTOSP & "/" & cuantos_pedido, True)
|
|
||||||
ToastMessageShow("ENVIAR DATOS (K-2)", True)
|
|
||||||
Log("No se cargo bien la info de pedido. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido)
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
End If
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "valida_pedidoc" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
If cuantos_pedidosc = CUANTOSC Then
|
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
|
||||||
Else
|
|
||||||
ToastMessageShow($"No se cargo bien la info de pedido_cliente.${CRLF}Envíe nuevamente: "$ & CUANTOSC & "/" & cuantos_pedidosc, True)
|
|
||||||
Log("No se cargo bien la info de pedido_cliente. Envíe nuevamente: " & CUANTOSC & "/" & cuantos_pedidosc)
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
End If
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
End If
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "valida_noventa" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
If cuantos_noventa = CUANTOSN Then
|
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
|
||||||
Else
|
|
||||||
ToastMessageShow($"No se cargo bien la info de NoVenta.${CRLF}Envíe nuevamente: "$ & CUANTOSN & "/" & cuantos_noventa, True)
|
|
||||||
Log("No se cargo bien la info de NoVenta. Envíe nuevamente:" & CUANTOSN & "/" & cuantos_noventa)
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If reqManager.reqsList.size = 0 Then T4.Enabled = True Else T4.Enabled = False
|
End If
|
||||||
Job.Release
|
|
||||||
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub valida
|
Sub valida
|
||||||
validando = True
|
validando = True
|
||||||
almacen = Subs.traeAlmacen
|
almacen = Subs.traeAlmacen
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_pedido = d.GetString("CUANTOS_PEDIDO")
|
' cuantos_pedido = d.GetString("CUANTOS_PEDIDO")
|
||||||
|
'
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_pedidosc = d.GetString("CUANTOS_PEDIDOSC")
|
' cuantos_pedidosc = d.GetString("CUANTOS_PEDIDOSC")
|
||||||
|
'
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_noventa = d.GetString("CUANTOS_NOVENTA")
|
' cuantos_noventa = d.GetString("CUANTOS_NOVENTA")
|
||||||
d.Close
|
' d.Close
|
||||||
|
|
||||||
cmd.Initialize
|
cmd.Initialize
|
||||||
cmd.Name = "select_cuantos_pedido_DUR"
|
cmd.Name = "select_cuantos_pedido_DUR"
|
||||||
@@ -442,7 +401,7 @@ Sub valida
|
|||||||
cmd.Name = "select_cuantos_pedidoc_DUR"
|
cmd.Name = "select_cuantos_pedidoc_DUR"
|
||||||
cmd.Parameters = Array As Object(almacen, Subs.traeRuta)
|
cmd.Parameters = Array As Object(almacen, Subs.traeRuta)
|
||||||
reqManager.ExecuteQuery(cmd , 0, "valida_pedidoc")
|
reqManager.ExecuteQuery(cmd , 0, "valida_pedidoc")
|
||||||
Log("http://keymon.net:1781")
|
' Log("http://keymon.net:1781")
|
||||||
|
|
||||||
B4XPages.MainPage.l_vPedidos2.Text = ""
|
B4XPages.MainPage.l_vPedidos2.Text = ""
|
||||||
B4XPages.MainPage.l_vProds2.Text = ""
|
B4XPages.MainPage.l_vProds2.Text = ""
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ Sub Class_Globals
|
|||||||
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
Dim l_ruta As Label
|
Dim l_ruta As Label
|
||||||
Dim foto1() As Byte
|
Dim foto1() As Byte
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
|
Dim datos_iguales As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Initializes the object. You can add parameters to this method if needed.
|
'Initializes the object. You can add parameters to this method if needed.
|
||||||
@@ -19,6 +22,7 @@ Public Sub Initialize
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
c=B4XPages.MainPage.skmt.ExecQuery("select usuario from usuarioa")
|
c=B4XPages.MainPage.skmt.ExecQuery("select usuario from usuarioa")
|
||||||
c.Position = 0
|
c.Position = 0
|
||||||
usuario = c.GetString("USUARIO")
|
usuario = c.GetString("USUARIO")
|
||||||
@@ -68,21 +72,69 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE")
|
Log("JOBDONE - " & almacen)
|
||||||
Log(reqManager.link)
|
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
|
||||||
If Job.Success = False Then
|
|
||||||
LogColor("Error: " & reqManager.HandleJob(Job).tag & " : " & Job.ErrorMessage, Colors.red)
|
|
||||||
Else 'If Job Success then ...
|
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.RGB(0,160,0)) 'Mod por CHV - 211027
|
|
||||||
Log(reqManager.reqsList.size)
|
|
||||||
If reqManager.reqsList.size = 0 Then B4XPages.MainPage.p_progressDialog.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Job.Release
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub valida
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
ToastMessageShow("Envío de Reparto Finalizado", True)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -12,16 +12,19 @@ Sub Class_Globals
|
|||||||
Dim usuario, almacen As String
|
Dim usuario, almacen As String
|
||||||
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
Dim l_ruta As Label
|
Dim l_ruta As Label
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Initializes the object. You can add parameters to this method if needed.
|
'Initializes the object. You can add parameters to this method if needed.
|
||||||
Public Sub Initialize
|
Public Sub Initialize
|
||||||
reqManager.Initialize(Me, "http://keymon.net:1782")
|
' reqManager.Initialize(Me, "http://keymon.net:1782")
|
||||||
l_ruta.Initialize("l")
|
l_ruta.Initialize("l")
|
||||||
Return Me
|
Return Me
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
' NOVENTA
|
' NOVENTA
|
||||||
l_ruta.text = Subs.traeRuta
|
l_ruta.text = Subs.traeRuta
|
||||||
c = B4XPages.MainPage.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO,NV_FOTO2, NV_REPROGRAMAR FROM NOVENTA")
|
c = B4XPages.MainPage.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO,NV_FOTO2, NV_REPROGRAMAR FROM NOVENTA")
|
||||||
@@ -237,4 +240,72 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
||||||
reqManager.Initialize(Me, ServidorURL)
|
reqManager.Initialize(Me, ServidorURL)
|
||||||
envia ' Llama a la función de envío original de C_Intmex
|
envia ' Llama a la función de envío original de C_Intmex
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub JobDone(Job As HttpJob)
|
||||||
|
Log("JOBDONE - " & almacen)
|
||||||
|
|
||||||
|
' 1. Tachamos el request de la lista
|
||||||
|
If reqManager.reqsList.IsInitialized Then
|
||||||
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub valida
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
ToastMessageShow("Envío de Reparto Finalizado", True)
|
||||||
End Sub
|
End Sub
|
||||||
86
B4A/C_ImportaBD.bas
Normal file
86
B4A/C_ImportaBD.bas
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
B4A=true
|
||||||
|
Group=Default Group
|
||||||
|
ModulesStructureVersion=1
|
||||||
|
Type=Class
|
||||||
|
Version=12.8
|
||||||
|
@EndOfDesignText@
|
||||||
|
' ====================================================================================
|
||||||
|
' CLASE: C_ImportaBD
|
||||||
|
' DESCRIPCION: Gestor aislado para atrapar Intents (ej. compartir desde WhatsApp)
|
||||||
|
' y poner la BD en la ruta interna de la app como "kmt.db".
|
||||||
|
' ====================================================================================
|
||||||
|
' INSTRUCCIONES (En cualquier B4XPage, usualmente B4XMainPage):
|
||||||
|
'
|
||||||
|
' 1. En Class_Globals se declara la instancia:
|
||||||
|
' Private importador As C_ImportaBD
|
||||||
|
'
|
||||||
|
' 2. En B4XPage_Created se inicializa la clase:
|
||||||
|
' importador.Initialize
|
||||||
|
'
|
||||||
|
' 3. En B4XPage_Appear se captura el Intent padre y se procesa:
|
||||||
|
' Dim in As Intent = B4XPages.GetNativeParent(Me).GetStartingIntent
|
||||||
|
'
|
||||||
|
' If importador.ProcesarIntent(in) Then
|
||||||
|
' ' Si entra aquí, la BD ya se copió exitosamente a File.DirInternal con el nombre "kmt.db"
|
||||||
|
' ToastMessageShow("BD importada correctamente", False)
|
||||||
|
'
|
||||||
|
' ' (Opcional) Identificar si el origen fue WhatsApp:
|
||||||
|
' If importador.EsDeWhatsapp(in) Then
|
||||||
|
' B4XPages.SetTitle(Me, "BD cargada desde Whatsapp")
|
||||||
|
' End If
|
||||||
|
'
|
||||||
|
' ' --> AQUI DEBES REINICIALIZAR TU CONEXION SQL <--
|
||||||
|
' ' Ej: skmt.Initialize(File.DirInternal, "kmt.db", True)
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' 4. Agregar esta sccion al manifiesto de la aplicacion
|
||||||
|
' 'Para que se registre para abrir bases de datos
|
||||||
|
' AddActivityText(Main,
|
||||||
|
' <intent-filter>
|
||||||
|
' <action android:name="android.intent.action.VIEW" />
|
||||||
|
' <category android:name="android.intent.category.DEFAULT" />
|
||||||
|
' <data android:pathPattern=".*\\.db" />
|
||||||
|
' <data android:mimeType="*/*" />
|
||||||
|
' </intent-filter>)
|
||||||
|
' ====================================================================================
|
||||||
|
|
||||||
|
Sub Class_Globals
|
||||||
|
Private intentUsado As Boolean = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub Initialize
|
||||||
|
intentUsado = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Procesa el intent. Retorna True si efectivamente copió una base de datos.
|
||||||
|
Public Sub ProcesarIntent(in As Intent) As Boolean
|
||||||
|
If intentUsado Or in = Null Then Return False
|
||||||
|
If Not(in.IsInitialized) Then Return False
|
||||||
|
|
||||||
|
intentUsado = True ' Sellamos para que no vuelva a procesar el mismo intent
|
||||||
|
|
||||||
|
If in.GetData <> Null Then
|
||||||
|
Dim XmlData As String = in.GetData
|
||||||
|
Log("Intent recibido: " & XmlData)
|
||||||
|
Try
|
||||||
|
Dim OutStr As OutputStream = File.OpenOutput(File.DirInternal, "kmt.db", False)
|
||||||
|
Dim InStr As InputStream = File.OpenInput("ContentDir", XmlData)
|
||||||
|
File.Copy2(InStr, OutStr)
|
||||||
|
OutStr.Close
|
||||||
|
LogColor("BD copiada a interna.", Colors.Blue)
|
||||||
|
Return True
|
||||||
|
Catch
|
||||||
|
Log("Error al copiar BD desde Intent: " & LastException)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Método auxiliar para revisar el origen
|
||||||
|
Public Sub EsDeWhatsapp(in As Intent) As Boolean
|
||||||
|
If in <> Null And in.IsInitialized Then
|
||||||
|
If in.As(String).Contains("whatsapp") Then Return True
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Sub
|
||||||
158
B4A/C_Intmex.bas
158
B4A/C_Intmex.bas
@@ -203,155 +203,83 @@ Sub envia
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE INTMEX")
|
Log("JOBDONE - " & almacen)
|
||||||
Log(reqManager.link)
|
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
End If
|
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
End If
|
||||||
If Job.Success = False Then
|
|
||||||
Log("ERROR")
|
If Not(Job.Success) Then
|
||||||
LogColor("Error: " & reqManager.HandleJob(Job).tag & " : " & Job.ErrorMessage, Colors.red)
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
' Job.Release
|
Else
|
||||||
Else 'If Job Success then ...
|
' 2. Procesamos validaciones
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.RGB(0,160,0)) 'Mod por CHV - 211027
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
'Verificamos que el usuario guardado en BD sea VALIDO.
|
|
||||||
If Job.JobName = "DBRequest" Then
|
If Job.JobName = "DBRequest" Then
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
If RESULT.Tag = "update_gps" Then
|
|
||||||
For Each records() As Object In RESULT.Rows
|
|
||||||
Log("==========================REGISTROS="&RESULT.Rows)
|
|
||||||
For Each k As String In RESULT.Columns.Keys
|
|
||||||
Log(RESULT.Tag & ": " & k & ": " & records(RESULT.Columns.Get(k)))
|
|
||||||
Next
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
If RESULT.Tag = "ins_pedidos" Then
|
|
||||||
For Each records() As Object In RESULT.Rows
|
|
||||||
Log("==========================REGISTROS="&RESULT.Rows)
|
|
||||||
For Each k As String In RESULT.Columns.Keys
|
|
||||||
Log(RESULT.Tag & ": " & k & ": " & records(RESULT.Columns.Get(k)))
|
|
||||||
Next
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "valida_pedido" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
Log(CUANTOSP)
|
|
||||||
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
If cuantos_pedido <= CUANTOSP Then
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
datos_iguales = "ok"
|
||||||
' S_CP.Text = "INFO OK"
|
|
||||||
ToastMessageShow("INFO OK", False)
|
|
||||||
Else
|
Else
|
||||||
' S_CP.Text = "ENVIAR DATOS (K-2)"
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
ToastMessageShow($"No se cargo bien la info de pedido.${CRLF}Envíe nuevamente: "$ & CUANTOSP & "/" & cuantos_pedido, True)
|
|
||||||
ToastMessageShow("ENVIAR DATOS (K-2)", True)
|
|
||||||
Log("No se cargo bien la info de pedido. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido)
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
End If
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "valida_pedidoc" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
If cuantos_pedidosc = CUANTOSC Then
|
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
|
||||||
Else
|
|
||||||
ToastMessageShow($"No se cargo bien la info de pedido_cliente.${CRLF}Envíe nuevamente: "$ & CUANTOSC & "/" & cuantos_pedidosc, True)
|
|
||||||
Log("No se cargo bien la info de pedido_cliente. Envíe nuevamente: " & CUANTOSC & "/" & cuantos_pedidosc)
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
End If
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
End If
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "valida_noventa" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
If cuantos_noventa = CUANTOSN Then
|
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
|
||||||
Else
|
|
||||||
ToastMessageShow($"No se cargo bien la info de NoVenta.${CRLF}Envíe nuevamente: "$ & CUANTOSN & "/" & cuantos_noventa, True)
|
|
||||||
Log("No se cargo bien la info de NoVenta. Envíe nuevamente:" & CUANTOSN & "/" & cuantos_noventa)
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "ins_pedido" Then 'query tag
|
|
||||||
For Each records() As Object In RESULT.Rows
|
|
||||||
' PB2.Progress = PB2.Progress + 5
|
|
||||||
' S_CP.Text = "SUBIENDO"
|
|
||||||
Next
|
|
||||||
' PB2.Progress = 100
|
|
||||||
Log("PROGRESO 100")
|
|
||||||
' S_CP.Text = "REVISANDO ..."
|
|
||||||
ToastMessageShow("REVISANDO", False)
|
|
||||||
Log("REVISANDO")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "ins_cuestionario" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
If reqManager.reqsList.size = 0 Then ' Si ya no hay consultas pendientes ...
|
|
||||||
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
B4XPages.MainPage.p_progressDialog.Visible = False
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
If enviando Then ' Si terminamos de enviar pedido ...
|
If enviando Then
|
||||||
Sleep(200)
|
|
||||||
B4XPages.MainPage.l_progressDialog.Text = "Validando " ' Mostramos el panel de progreso.
|
|
||||||
B4XPages.MainPage.p_progressDialog.Visible = True
|
|
||||||
valida ' Iniciamos la validación
|
|
||||||
enviando = False
|
enviando = False
|
||||||
End If
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
If validando Then
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
validando = False
|
validando = False
|
||||||
Sleep(300)
|
Sleep(300)
|
||||||
'Mostramos el panel de Validación.
|
|
||||||
B4XPages.MainPage.p_validacion.Visible = True
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Job.Release
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub valida
|
Sub valida
|
||||||
validando = True
|
validando = True
|
||||||
almacen = Subs.traeAlmacen
|
' almacen = Subs.traeAlmacen
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_pedido = d.GetString("CUANTOS_PEDIDO")
|
' cuantos_pedido = d.GetString("CUANTOS_PEDIDO")
|
||||||
|
'
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE ")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_pedidosc = d.GetString("CUANTOS_PEDIDOSC")
|
' cuantos_pedidosc = d.GetString("CUANTOS_PEDIDOSC")
|
||||||
|
'
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_noventa = d.GetString("CUANTOS_NOVENTA")
|
' cuantos_noventa = d.GetString("CUANTOS_NOVENTA")
|
||||||
d.Close
|
' d.Close
|
||||||
|
|
||||||
cmd.Initialize
|
cmd.Initialize
|
||||||
cmd.Name = "select_cuantos_pedido_INTMEX"
|
cmd.Name = "select_cuantos_pedido_INTMEX"
|
||||||
@@ -368,7 +296,7 @@ Sub valida
|
|||||||
cmd.Name = "select_cuantos_pedidoc_INTMEX"
|
cmd.Name = "select_cuantos_pedidoc_INTMEX"
|
||||||
cmd.Parameters = Array As Object(almacen, Subs.traeRuta)
|
cmd.Parameters = Array As Object(almacen, Subs.traeRuta)
|
||||||
reqManager.ExecuteQuery(cmd , 0, "valida_pedidoc")
|
reqManager.ExecuteQuery(cmd , 0, "valida_pedidoc")
|
||||||
Log("http://keymon.net:1781")
|
' Log("http://keymon.net:1781")
|
||||||
|
|
||||||
B4XPages.MainPage.l_vPedidos2.Text = ""
|
B4XPages.MainPage.l_vPedidos2.Text = ""
|
||||||
B4XPages.MainPage.l_vProds2.Text = ""
|
B4XPages.MainPage.l_vProds2.Text = ""
|
||||||
|
|||||||
@@ -10,15 +10,19 @@ Sub Class_Globals
|
|||||||
Dim b, c, d, f As Cursor
|
Dim b, c, d, f As Cursor
|
||||||
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
Dim l_ruta As Label
|
Dim l_ruta As Label
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
|
Dim datos_iguales As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Initializes the object. You can add parameters to this method if needed.
|
'Initializes the object. You can add parameters to this method if needed.
|
||||||
Public Sub Initialize
|
Public Sub Initialize
|
||||||
reqManager.Initialize(Me, "http://keymon.net:1781")
|
' reqManager.Initialize(Me, "http://keymon.net:1781")
|
||||||
l_ruta.Initialize("l")
|
l_ruta.Initialize("l")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
almacen = Subs.traeAlmacen
|
almacen = Subs.traeAlmacen
|
||||||
Dim foto1() As Byte
|
Dim foto1() As Byte
|
||||||
' NOVENTA
|
' NOVENTA
|
||||||
@@ -232,21 +236,69 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE INTMEX REPARTO")
|
Log("JOBDONE - " & almacen)
|
||||||
Log(reqManager.link)
|
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
|
||||||
If Job.Success = False Then
|
|
||||||
LogColor("Error: " & reqManager.HandleJob(Job).tag & " : " & Job.ErrorMessage, Colors.red)
|
|
||||||
Else 'If Job Success then ...
|
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.RGB(0,160,0)) 'Mod por CHV - 211027
|
|
||||||
Log(reqManager.reqsList.size)
|
|
||||||
If reqManager.reqsList.size = 0 Then B4XPages.MainPage.p_progressDialog.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Job.Release
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub valida
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
ToastMessageShow("Envío de Reparto Finalizado", True)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -11,6 +11,8 @@ Sub Class_Globals
|
|||||||
Dim cmd As DBCommand
|
Dim cmd As DBCommand
|
||||||
Dim b, c, d As Cursor
|
Dim b, c, d As Cursor
|
||||||
Dim usuario, almacen As String
|
Dim usuario, almacen As String
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -21,6 +23,7 @@ Public Sub Initialize
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
' carga = "SUBIR"
|
' carga = "SUBIR"
|
||||||
' p_mandaInfo.Width = Root.Width
|
' p_mandaInfo.Width = Root.Width
|
||||||
' p_mandaInfo.Height = Root.Height
|
' p_mandaInfo.Height = Root.Height
|
||||||
@@ -209,7 +212,7 @@ Sub envia
|
|||||||
|
|
||||||
' PEDIDO
|
' PEDIDO
|
||||||
c = B4XPages.MainPage.skmt.ExecQuery("SELECT PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO, PE_COSTO_SIN, PE_RUTA, PE_DESC, PE_FOLIO, PE_CANTC, PE_BCAJAS FROM PEDIDO WHERE PE_FOLIO <> 'RECARGA'")
|
c = B4XPages.MainPage.skmt.ExecQuery("SELECT PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO, PE_COSTO_SIN, PE_RUTA, PE_DESC, PE_FOLIO, PE_CANTC, PE_BCAJAS FROM PEDIDO WHERE PE_FOLIO <> 'RECARGA'")
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")
|
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO WHERE PE_FOLIO <> 'RECARGA'")
|
||||||
If c.RowCount > 0 Then
|
If c.RowCount > 0 Then
|
||||||
For i = 0 To c.RowCount - 1
|
For i = 0 To c.RowCount - 1
|
||||||
c.Position = i
|
c.Position = i
|
||||||
@@ -422,4 +425,67 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
||||||
reqManager.Initialize(Me, ServidorURL)
|
reqManager.Initialize(Me, ServidorURL)
|
||||||
envia ' Llama a la función de envío original de C_Intmex
|
envia ' Llama a la función de envío original de C_Intmex
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub JobDone(Job As HttpJob)
|
||||||
|
Log("JOBDONE - " & almacen)
|
||||||
|
|
||||||
|
' 1. Tachamos el request de la lista
|
||||||
|
If reqManager.reqsList.IsInitialized Then
|
||||||
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -13,6 +13,9 @@ Sub Class_Globals
|
|||||||
Dim foto1(), foto2(), foto3(), foto4() As Byte
|
Dim foto1(), foto2(), foto3(), foto4() As Byte
|
||||||
Dim PORCENTAJE, PASO, PERFIL, NUMERO_PEDIDO, l_ruta As String
|
Dim PORCENTAJE, PASO, PERFIL, NUMERO_PEDIDO, l_ruta As String
|
||||||
Dim contador_env, contador_strem, reqTotales As Int
|
Dim contador_env, contador_strem, reqTotales As Int
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
|
Dim datos_iguales As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Initializes the object.
|
' Initializes the object.
|
||||||
@@ -37,13 +40,14 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
reqTotales = reqManager.reqsList.Size
|
reqTotales = reqManager.reqsList.Size
|
||||||
If reqTotales > 0 Then
|
If reqTotales > 0 Then
|
||||||
Dim t1 As Timer
|
Dim t1 As Timer
|
||||||
t1.Initialize("T1", 20000)
|
' t1.Initialize("T1", 20000)
|
||||||
t1.Enabled = True
|
' t1.Enabled = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' **FUNCIÓN ESTANDARIZADA:** Ejecuta la subida de datos (equivalente a Subir_Click -> SUBIR_INFO_PEDIDO)
|
' **FUNCIÓN ESTANDARIZADA:** Ejecuta la subida de datos (equivalente a Subir_Click -> SUBIR_INFO_PEDIDO)
|
||||||
Public Sub envia
|
Public Sub envia
|
||||||
|
enviando = True
|
||||||
' 1. Limpieza y preparación inicial (lógica de Subir_Click)
|
' 1. Limpieza y preparación inicial (lógica de Subir_Click)
|
||||||
SUBIR_INFO_PREPARACION
|
SUBIR_INFO_PREPARACION
|
||||||
|
|
||||||
@@ -291,88 +295,73 @@ Private Sub enviaPedido(filtro As String)
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
reqManager.ExecuteCommand(cmd , $"ins_pedido_${cPed.GetString("PE_CLIENTE")}"$)
|
reqManager.ExecuteCommand(cmd , $"ins_pedido_${cPed.GetString("PE_CLIENTE")}"$)
|
||||||
contador_env = contador_env + 1
|
contador_env = contador_env + 1
|
||||||
Next
|
Next
|
||||||
cPed.Close
|
cPed.Close
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' El callback se maneja aquí, ya que 'Me' fue C_Kelloggs en la inicialización del reqManager
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE KELLOGGS")
|
Log("JOBDONE - " & almacen)
|
||||||
' Lógica para manejar errores y remover de reqsList
|
|
||||||
' reqManager.trackNext(Job)
|
' 1. Tachamos el request de la lista
|
||||||
|
If reqManager.reqsList.IsInitialized Then
|
||||||
If Not(Job.Success) Then
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
LogColor("Error: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.red)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
Else ' Si Job.Success es True
|
End If
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
|
|
||||||
LogColor("JobDone: '" & RESULT.tag & "' - Registros: " & RESULT.Rows.Size, Colors.Green)
|
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
' Manejo de comandos de INSERCIÓN (Actualización de estados en DB local)
|
Else
|
||||||
If RESULT.Tag.As(String).StartsWith("ins_pedido_") Then ' Procesa insert_pedido_KELL
|
' 2. Procesamos validaciones
|
||||||
Private temp() As String = Regex.Split("_", RESULT.Tag)
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
If temp.Length > 1 Then
|
|
||||||
B4XPages.MainPage.skmt.ExecNonQuery($"update pedido set pe_enviado = 1 where pe_cliente = '${temp(2)}'"$)
|
If Job.JobName = "DBRequest" Then
|
||||||
End If
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
Else If RESULT.Tag.As(String).StartsWith("ins_pedidos_") Then ' Procesa insert_pedidos_KELL (Cabeceras)
|
For Each records() As Object In RESULT.Rows
|
||||||
Private temp() As String = Regex.Split("_", RESULT.Tag)
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
If temp.Length > 1 Then
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
B4XPages.MainPage.skmt.ExecNonQuery($"update pedido_cliente set pc_enviado = 1 where pc_cliente = '${temp(2)}'"$)
|
' Mantenemos tu lógica permisiva
|
||||||
End If
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
Else If RESULT.Tag = "valida_pedido" Then ' Procesa select_cuantos_pedido_KELL
|
Else
|
||||||
' Lógica de validación de pedidos (productos)
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
For Each records() As Object In RESULT.Rows
|
End If
|
||||||
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
Next
|
||||||
If cuantos_pedido <= CUANTOSP Then
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
Log($"Validación Pedidos OK: ${CUANTOSP}/${cuantos_pedido}"$)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
Else
|
For Each records() As Object In RESULT.Rows
|
||||||
LogColor($"Validación Pedidos FALLÓ: ${CUANTOSP}/${cuantos_pedido}. Se requiere reenvío."$, Colors.Red)
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
End If
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
Next
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
Else If RESULT.Tag = "valida_pedidoc" Then ' Procesa select_cuantos_pedidoc_KELL
|
Subs.logJobDoneResultados(RESULT)
|
||||||
' Lógica de validación de pedidos cliente (cabeceras)
|
For Each records() As Object In RESULT.Rows
|
||||||
For Each records() As Object In RESULT.Rows
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
If cuantos_pedidosc = CUANTOSC Then
|
Next
|
||||||
Log($"Validación Pedidos Cliente OK: ${CUANTOSC}/${cuantos_pedidosc}"$)
|
End If
|
||||||
Else
|
End If
|
||||||
LogColor($"Validación Pedidos Cliente FALLÓ: ${CUANTOSC}/${cuantos_pedidosc}. Se requiere reenvío."$, Colors.Red)
|
End If
|
||||||
End If
|
|
||||||
Next
|
Job.Release
|
||||||
|
|
||||||
Else If RESULT.Tag = "valida_noventa" Then ' Procesa select_cuantos_noventa_KELL
|
' 3. Control de flujo seguro
|
||||||
' Lógica de validación de no venta
|
If reqManager.reqsList.size = 0 Then
|
||||||
For Each records() As Object In RESULT.Rows
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
If enviando Then
|
||||||
If cuantos_noventa = CUANTOSN Then
|
enviando = False
|
||||||
Log($"Validación NoVenta OK: ${CUANTOSN}/${cuantos_noventa}"$)
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
Else
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
LogColor($"Validación NoVenta FALLÓ: ${CUANTOSN}/${cuantos_noventa}. Se requiere reenvío."$, Colors.Red)
|
Sleep(200)
|
||||||
End If
|
valida
|
||||||
Next
|
Else If validando Then
|
||||||
End If
|
validando = False
|
||||||
End If
|
Sleep(300)
|
||||||
End If
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
Job.Release
|
End If
|
||||||
|
|
||||||
' Lógica de finalización: Inicia la validación al terminar todos los envíos
|
|
||||||
If reqManager.reqsList.Size = 0 Then
|
|
||||||
If PASO = "1" Then ' Si terminamos la fase de envío
|
|
||||||
PASO = "2"
|
|
||||||
Dim t1 As Timer
|
|
||||||
t1.Initialize("T1", 2000)
|
|
||||||
t1.Enabled = True
|
|
||||||
Log("Envío finalizado. Se inicia TIMER T1 para validación.")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Lógica de validación forzada (simula T1_Tick)
|
' Lógica de validación forzada (simula T1_Tick)
|
||||||
|
|||||||
@@ -22,12 +22,11 @@ End Sub
|
|||||||
'You can add more parameters here.
|
'You can add more parameters here.
|
||||||
Public Sub Initialize As Object
|
Public Sub Initialize As Object
|
||||||
' reqManager.Initialize(Me, "http://keymon.lat:1781")
|
' reqManager.Initialize(Me, "http://keymon.lat:1781")
|
||||||
reqManager.Initialize(Me, "http://keymon.net:1781")
|
|
||||||
l_ruta.Initialize("")
|
l_ruta.Initialize("")
|
||||||
L_ABORDO.Initialize("")
|
L_ABORDO.Initialize("")
|
||||||
l_porvisitar.Initialize("")
|
l_porvisitar.Initialize("")
|
||||||
T4.Initialize("T4", 3000)
|
' T4.Initialize("T4", 3000)
|
||||||
T4.Enabled = False
|
' T4.Enabled = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'This event will be called once, before the page becomes visible.
|
'This event will be called once, before the page becomes visible.
|
||||||
@@ -40,6 +39,7 @@ End Sub
|
|||||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
carga = "SUBIR"
|
carga = "SUBIR"
|
||||||
almacen = Subs.traeAlmacen
|
almacen = Subs.traeAlmacen
|
||||||
l_ruta.TEXT = Subs.traeRuta
|
l_ruta.TEXT = Subs.traeRuta
|
||||||
@@ -324,185 +324,115 @@ Sub envia
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
T4.Initialize("T4", 3000)
|
' T4.Initialize("T4", 3000)
|
||||||
T4.Enabled = True
|
' T4.Enabled = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE MARQUEZ")
|
Log("JOBDONE - " & almacen)
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
|
||||||
LogColor($">>>>>>>>>> Llega ${Job.tag} <<<<<<<<<<"$, Colors.Blue)
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
' LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
End If
|
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
End If
|
||||||
If Job.Success = False Then
|
|
||||||
LogColor("############################################", Colors.red)
|
If Not(Job.Success) Then
|
||||||
LogColor("#### Error: " & Job.tag & " : " & Job.ErrorMessage, Colors.red)
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
LogColor("############################################", Colors.red)
|
|
||||||
Else
|
Else
|
||||||
' Log(3)
|
' 2. Procesamos validaciones
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.RGB(0,160,0)) 'Mod por CHV - 211027
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
If Job.JobName = "DBRequest" Then
|
If Job.JobName = "DBRequest" Then
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
|
||||||
If reqManager.reqsList.IndexOf(RESULT.tag) <> -1 Then
|
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(RESULT.tag))
|
|
||||||
LogColor($"*** Quitamos ${RESULT.tag}"$, Colors.Magenta)
|
|
||||||
T4.Initialize("T4", 2000)
|
|
||||||
End If
|
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.red)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
If Job.JobName = "DBRequest" Then
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "ins_pedidos" Then
|
|
||||||
For Each records() As Object In RESULT.Rows
|
|
||||||
' Log("==========================REGISTROS="&RESULT.Rows)
|
|
||||||
For Each k As String In RESULT.Columns.Keys
|
|
||||||
Log(RESULT.Tag & ": " & k & ": " & records(RESULT.Columns.Get(k)))
|
|
||||||
Next
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
Dim resultado As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If resultado.Tag = "piezas" Then 'query tag
|
|
||||||
' B4XPages.MainPage.picking.cl_picking.Clear
|
|
||||||
Dim piezasexiste As Int
|
|
||||||
sDate=DateTime.Date(DateTime.Now)
|
|
||||||
sTime=DateTime.Time(DateTime.Now)
|
|
||||||
For Each records() As Object In resultado.Rows
|
|
||||||
piezasexiste = records(resultado.Columns.Get("COUNT(*)"))
|
|
||||||
Log(piezasexiste)
|
|
||||||
DateTime.DateFormat = "MM/dd/yyyy"
|
|
||||||
DateTime.TimeFormat = "HH:mm:ss"
|
|
||||||
sDate=DateTime.Date(DateTime.Now)
|
|
||||||
sTime=DateTime.Time(DateTime.Now)
|
|
||||||
If piezasexiste = 0 Then
|
|
||||||
Dim PCNoArts As String
|
|
||||||
Dim PCMonto As String
|
|
||||||
c = B4XPages.MainPage.skmt.ExecQuery2("SELECT * FROM PEDIDO_CLIENTE WHERE PC_CLIENTE = ? AND PC_CLIENTE <> 1", Array As String(userpiezas))
|
|
||||||
If c.RowCount > 0 Then
|
|
||||||
c.Position = 0
|
|
||||||
PCNoArts = c.GetString("PC_NOART")
|
|
||||||
PCMonto = c.GetString("PC_MONTO")
|
|
||||||
End If
|
|
||||||
Dim cmd As DBCommand
|
|
||||||
cmd.Initialize
|
|
||||||
cmd.Name = "insert_HVC_MARQUEZ"
|
|
||||||
cmd.Parameters = Array As Object((sDate & " " & sTime), userpiezas, PCNoArts, PCMonto, almacen, l_ruta.Text)
|
|
||||||
reqManager.ExecuteCommand(cmd , "insert_hvc")
|
|
||||||
' reqManager.ExecuteCommand(cmd , $"ins_abonosPendientes_${ab.GetString("a_cliente")}"$)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
' If RESULT.Tag = "valida_pedido" Then 'query tag
|
|
||||||
' For Each records() As Object In RESULT.Rows
|
|
||||||
' Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
|
||||||
' If cuantos_pedido <= CUANTOSP Then
|
|
||||||
' ' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
' datos_iguales = "ok"
|
|
||||||
' ToastMessageShow("INFO OK", False)
|
|
||||||
' Else
|
|
||||||
'' If Starter.marcaCel <> "Sony" Then ToastMessageShow("No se cargo bien la info P. Sync Nuevamente" & CUANTOSP & " " & cuantos_pedido, True)
|
|
||||||
' ToastMessageShow("ENVIAR DATOS (K-2)", False)
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
If RESULT.Tag = "valida_pedido" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
Log(CUANTOSP)
|
|
||||||
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
If cuantos_pedido <= CUANTOSP Then
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
datos_iguales = "ok"
|
||||||
' S_CP.Text = "INFO OK"
|
|
||||||
ToastMessageShow("INFO OK", False)
|
|
||||||
Else
|
Else
|
||||||
' S_CP.Text = "ENVIAR DATOS (K-2)"
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
ToastMessageShow($"No se cargo bien la info de pedido.${CRLF}Envíe nuevamente: "$ & CUANTOSP & "/" & cuantos_pedido, True)
|
|
||||||
ToastMessageShow("ENVIAR DATOS (K-2)", True)
|
|
||||||
Log("No se cargo bien la info de pedido. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido)
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
|
||||||
If RESULT.Tag = "valida_pedidoc" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
If cuantos_pedidosc = CUANTOSC Then
|
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
|
||||||
Else
|
|
||||||
ToastMessageShow($"No se cargo bien la info de pedido_cliente.${CRLF}Envíe nuevamente: "$ & CUANTOSC & "/" & cuantos_pedidosc, True)
|
|
||||||
Log("No se cargo bien la info de pedido_cliente. Envíe nuevamente: " & CUANTOSC & "/" & cuantos_pedidosc)
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
End If
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
|
||||||
If RESULT.Tag = "valida_noventa" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
Subs.logJobDoneResultados(RESULT)
|
||||||
For Each records() As Object In RESULT.Rows
|
For Each records() As Object In RESULT.Rows
|
||||||
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
If cuantos_noventa = CUANTOSN Then
|
|
||||||
' ToastMessageShow("rojo val ok 1 cuantosp." , True)
|
|
||||||
datos_iguales = "ok"
|
|
||||||
Else
|
|
||||||
ToastMessageShow($"No se cargo bien la info de NoVenta.${CRLF}Envíe nuevamente: "$ & CUANTOSN & "/" & cuantos_noventa, True)
|
|
||||||
Log("No se cargo bien la info de NoVenta. Envíe nuevamente:" & CUANTOSN & "/" & cuantos_noventa)
|
|
||||||
End If
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "ins_pedido" Then 'query tag
|
|
||||||
For Each records() As Object In RESULT.Rows
|
|
||||||
' PB2.Progress = PB2.Progress + 5
|
|
||||||
' S_CP.Text = "SUBIENDO"
|
|
||||||
Next
|
|
||||||
' PB2.Progress = 100
|
|
||||||
' S_CP.Text = "REVISANDO ..."
|
|
||||||
' Log("5")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
|
||||||
If RESULT.Tag = "ins_cuestionario" Then 'query tag
|
|
||||||
Subs.logJobDoneResultados(RESULT)
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Log(reqManager.reqsList.size)
|
|
||||||
If reqManager.reqsList.size = 0 Then
|
If RESULT.Tag = "piezas" Then 'query tag
|
||||||
T4.Enabled = True
|
Dim piezasexiste As Int
|
||||||
Else
|
For Each records() As Object In RESULT.Rows
|
||||||
T4.Enabled = False
|
piezasexiste = records(RESULT.Columns.Get("COUNT(*)"))
|
||||||
|
Log(piezasexiste)
|
||||||
|
DateTime.DateFormat = "MM/dd/yyyy"
|
||||||
|
DateTime.TimeFormat = "HH:mm:ss"
|
||||||
|
sDate=DateTime.Date(DateTime.Now)
|
||||||
|
sTime=DateTime.Time(DateTime.Now)
|
||||||
|
If piezasexiste = 0 Then
|
||||||
|
Dim PCNoArts As String
|
||||||
|
Dim PCMonto As String
|
||||||
|
c = B4XPages.MainPage.skmt.ExecQuery2("SELECT * FROM PEDIDO_CLIENTE WHERE PC_CLIENTE = ? AND PC_CLIENTE <> 1", Array As String(userpiezas))
|
||||||
|
If c.RowCount > 0 Then
|
||||||
|
c.Position = 0
|
||||||
|
PCNoArts = c.GetString("PC_NOART")
|
||||||
|
PCMonto = c.GetString("PC_MONTO")
|
||||||
|
End If
|
||||||
|
Dim cmd As DBCommand
|
||||||
|
cmd.Initialize
|
||||||
|
cmd.Name = "insert_HVC_MARQUEZ"
|
||||||
|
cmd.Parameters = Array As Object((sDate & " " & sTime), userpiezas, PCNoArts, PCMonto, almacen, l_ruta.Text)
|
||||||
|
reqManager.ExecuteCommand(cmd , "insert_hvc")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Job.Release
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub valida
|
Sub valida
|
||||||
validando = True
|
validando = True
|
||||||
almacen = Subs.traeAlmacen
|
almacen = Subs.traeAlmacen
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_pedido = d.GetString("CUANTOS_PEDIDO")
|
' cuantos_pedido = d.GetString("CUANTOS_PEDIDO")
|
||||||
|
'
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) as CUANTOS_PEDIDOSC FROM PEDIDO_CLIENTE")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_pedidosc = d.GetString("CUANTOS_PEDIDOSC")
|
' cuantos_pedidosc = d.GetString("CUANTOS_PEDIDOSC")
|
||||||
|
'
|
||||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
||||||
d.Position = 0
|
' d.Position = 0
|
||||||
cuantos_noventa = d.GetString("CUANTOS_NOVENTA")
|
' cuantos_noventa = d.GetString("CUANTOS_NOVENTA")
|
||||||
d.Close
|
' d.Close
|
||||||
|
|
||||||
cmd.Initialize
|
cmd.Initialize
|
||||||
cmd.Name = "select_cuantos_pedido_MARQUEZ"
|
cmd.Name = "select_cuantos_pedido_MARQUEZ"
|
||||||
@@ -518,7 +448,7 @@ Sub valida
|
|||||||
cmd.Name = "select_cuantos_pedidoc_MARQUEZ"
|
cmd.Name = "select_cuantos_pedidoc_MARQUEZ"
|
||||||
cmd.Parameters = Array As Object(almacen,l_ruta.text)
|
cmd.Parameters = Array As Object(almacen,l_ruta.text)
|
||||||
reqManager.ExecuteQuery(cmd , 0, "valida_pedidoc")
|
reqManager.ExecuteQuery(cmd , 0, "valida_pedidoc")
|
||||||
Log("http://keymon.net:1781")
|
' Log("http://keymon.net:1781")
|
||||||
|
|
||||||
B4XPages.MainPage.l_vPedidos2.Text = ""
|
B4XPages.MainPage.l_vPedidos2.Text = ""
|
||||||
B4XPages.MainPage.l_vProds2.Text = ""
|
B4XPages.MainPage.l_vProds2.Text = ""
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ Sub Class_Globals
|
|||||||
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
Dim l_ruta As Label
|
Dim l_ruta As Label
|
||||||
Dim foto1() As Byte
|
Dim foto1() As Byte
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
|
Dim datos_iguales As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Initializes the object. You can add parameters to this method if needed.
|
'Initializes the object. You can add parameters to this method if needed.
|
||||||
@@ -19,6 +22,7 @@ Public Sub Initialize
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
' NOVENTA
|
' NOVENTA
|
||||||
c = B4XPages.MainPage.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO FROM NOVENTA")
|
c = B4XPages.MainPage.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO FROM NOVENTA")
|
||||||
D=B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
D=B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
||||||
@@ -215,21 +219,69 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE")
|
Log("JOBDONE - " & almacen)
|
||||||
Log(reqManager.link)
|
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
|
||||||
If Job.Success = False Then
|
|
||||||
LogColor("Error: " & reqManager.HandleJob(Job).tag & " : " & Job.ErrorMessage, Colors.red)
|
|
||||||
Else 'If Job Success then ...
|
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.RGB(0,160,0)) 'Mod por CHV - 211027
|
|
||||||
Log(reqManager.reqsList.size)
|
|
||||||
If reqManager.reqsList.size = 0 Then B4XPages.MainPage.p_progressDialog.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Job.Release
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub valida
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
ToastMessageShow("Envío de Reparto Finalizado", True)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -11,6 +11,8 @@ Sub Class_Globals
|
|||||||
Dim cmd As DBCommand
|
Dim cmd As DBCommand
|
||||||
Dim c, d As Cursor
|
Dim c, d As Cursor
|
||||||
Dim usuario, almacen As String
|
Dim usuario, almacen As String
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -30,6 +32,7 @@ End Sub
|
|||||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
checaPedido
|
checaPedido
|
||||||
almacen = Subs.traeAlmacen
|
almacen = Subs.traeAlmacen
|
||||||
' CARGA = "SUBIR"
|
' CARGA = "SUBIR"
|
||||||
@@ -321,4 +324,67 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
||||||
reqManager.Initialize(Me, ServidorURL)
|
reqManager.Initialize(Me, ServidorURL)
|
||||||
envia ' Llama a la función de envío original de C_Intmex
|
envia ' Llama a la función de envío original de C_Intmex
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub JobDone(Job As HttpJob)
|
||||||
|
Log("JOBDONE - " & almacen)
|
||||||
|
|
||||||
|
' 1. Tachamos el request de la lista
|
||||||
|
If reqManager.reqsList.IsInitialized Then
|
||||||
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -15,6 +15,9 @@ Sub Class_Globals
|
|||||||
Dim totalRegistros As Int = 0
|
Dim totalRegistros As Int = 0
|
||||||
Dim totalRegistrosTotales As Int = 0
|
Dim totalRegistrosTotales As Int = 0
|
||||||
Dim todosRequest As Int = 0
|
Dim todosRequest As Int = 0
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
|
Dim datos_iguales As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Initializes the object. You can add parameters to this method if needed.
|
'Initializes the object. You can add parameters to this method if needed.
|
||||||
@@ -23,6 +26,7 @@ Public Sub Initialize
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
Log("*** Entramos a envia info***")
|
Log("*** Entramos a envia info***")
|
||||||
Log("--- Entramos a envia info---")
|
Log("--- Entramos a envia info---")
|
||||||
Log("### Entramos a envia info###")
|
Log("### Entramos a envia info###")
|
||||||
@@ -309,21 +313,69 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE")
|
Log("JOBDONE - " & almacen)
|
||||||
Log(reqManager.link)
|
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
|
||||||
If Job.Success = False Then
|
|
||||||
LogColor("Error: " & reqManager.HandleJob(Job).tag & " : " & Job.ErrorMessage, Colors.red)
|
|
||||||
Else 'If Job Success then ...
|
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.RGB(0,160,0)) 'Mod por CHV - 211027
|
|
||||||
Log(reqManager.reqsList.size)
|
|
||||||
If reqManager.reqsList.size = 0 Then B4XPages.MainPage.p_progressDialog.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Job.Release
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub valida
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
ToastMessageShow("Envío de Reparto Finalizado", True)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -13,6 +13,8 @@ Sub Class_Globals
|
|||||||
Dim usuario, almacen As String
|
Dim usuario, almacen As String
|
||||||
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim datos_iguales, almacen, carga, paso, conteo, porcentaje, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
Dim l_ruta As Label
|
Dim l_ruta As Label
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Initializes the object. You can add parameters to this method if needed.
|
'Initializes the object. You can add parameters to this method if needed.
|
||||||
@@ -23,6 +25,7 @@ Public Sub Initialize
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
l_ruta.text = Subs.traeRuta
|
l_ruta.text = Subs.traeRuta
|
||||||
' carga = "SUBIR"
|
' carga = "SUBIR"
|
||||||
' P1.Visible = True
|
' P1.Visible = True
|
||||||
@@ -298,4 +301,67 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
' 'Me' aquí es C_Intmex, asegurando que C_Intmex.JobDone sea llamado.
|
||||||
reqManager.Initialize(Me, ServidorURL)
|
reqManager.Initialize(Me, ServidorURL)
|
||||||
envia ' Llama a la función de envío original de C_Intmex
|
envia ' Llama a la función de envío original de C_Intmex
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub JobDone(Job As HttpJob)
|
||||||
|
Log("JOBDONE - " & almacen)
|
||||||
|
|
||||||
|
' 1. Tachamos el request de la lista
|
||||||
|
If reqManager.reqsList.IsInitialized Then
|
||||||
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -11,6 +11,9 @@ Sub Class_Globals
|
|||||||
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
Dim almacen, perfil, cuantos, NUMERO_PEDIDO, usuario, cuantos_exib, cuantos_pedidosc, cuantos_noventa, cuantos_ped, cuantos_pedido As String
|
||||||
Dim l_ruta As Label
|
Dim l_ruta As Label
|
||||||
Dim foto1() As Byte
|
Dim foto1() As Byte
|
||||||
|
Dim enviando As Boolean = False
|
||||||
|
Dim validando As Boolean = False
|
||||||
|
Dim datos_iguales As String
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Initializes the object. You can add parameters to this method if needed.
|
'Initializes the object. You can add parameters to this method if needed.
|
||||||
@@ -19,6 +22,7 @@ Public Sub Initialize
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub envia
|
Sub envia
|
||||||
|
enviando = True
|
||||||
' NOVENTA
|
' NOVENTA
|
||||||
c = B4XPages.MainPage.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO,NV_FOTO2, NV_REPROGRAMAR FROM NOVENTA")
|
c = B4XPages.MainPage.skmt.ExecQuery("SELECT NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO,NV_FOTO2, NV_REPROGRAMAR FROM NOVENTA")
|
||||||
D=B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
D=B4XPages.MainPage.skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
||||||
@@ -262,21 +266,69 @@ Public Sub ConfigurarYEnviar(ServidorURL As String)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
Log("JOBDONE")
|
Log("JOBDONE - " & almacen)
|
||||||
Log(reqManager.link)
|
|
||||||
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
' 1. Tachamos el request de la lista
|
||||||
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
If reqManager.reqsList.IsInitialized Then
|
||||||
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
Dim index As Int = reqManager.reqsList.IndexOf(Job.tag)
|
||||||
LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
If index <> -1 Then reqManager.reqsList.RemoveAt(index)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error en red: " & Job.tag & " : " & Subs.parseHTTPError(Job.ErrorMessage), Colors.Red)
|
||||||
|
Else
|
||||||
|
' 2. Procesamos validaciones
|
||||||
|
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||||
|
|
||||||
|
If Job.JobName = "DBRequest" Then
|
||||||
|
If RESULT.Tag = "valida_pedido" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSP As Int = records(RESULT.Columns.Get("CUANTOSP"))
|
||||||
|
B4XPages.MainPage.l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
|
' Mantenemos tu lógica permisiva
|
||||||
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
|
datos_iguales = "ok"
|
||||||
|
Else
|
||||||
|
LogColor("Faltan pedidos. Envíe nuevamente: " & CUANTOSP & "/" & cuantos_pedido, Colors.Red)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_pedidoc" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSC As Int = records(RESULT.Columns.Get("CUANTOSC"))
|
||||||
|
B4XPages.MainPage.l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
Next
|
||||||
|
Else If RESULT.Tag = "valida_noventa" Then
|
||||||
|
Subs.logJobDoneResultados(RESULT)
|
||||||
|
For Each records() As Object In RESULT.Rows
|
||||||
|
Dim CUANTOSN As Int = records(RESULT.Columns.Get("CUANTOSN"))
|
||||||
|
B4XPages.MainPage.l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
Next
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
|
||||||
End If
|
|
||||||
If Job.Success = False Then
|
|
||||||
LogColor("Error: " & reqManager.HandleJob(Job).tag & " : " & Job.ErrorMessage, Colors.red)
|
|
||||||
Else 'If Job Success then ...
|
|
||||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.RGB(0,160,0)) 'Mod por CHV - 211027
|
|
||||||
Log(reqManager.reqsList.size)
|
|
||||||
If reqManager.reqsList.size = 0 Then B4XPages.MainPage.p_progressDialog.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Job.Release
|
Job.Release
|
||||||
|
|
||||||
|
' 3. Control de flujo seguro
|
||||||
|
If reqManager.reqsList.size = 0 Then
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
If enviando Then
|
||||||
|
enviando = False
|
||||||
|
B4XPages.MainPage.l_progressDialog.Text = "Validando "
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = True
|
||||||
|
Sleep(200)
|
||||||
|
valida
|
||||||
|
Else If validando Then
|
||||||
|
validando = False
|
||||||
|
Sleep(300)
|
||||||
|
B4XPages.MainPage.p_validacion.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub valida
|
||||||
|
B4XPages.MainPage.p_progressDialog.Visible = False
|
||||||
|
ToastMessageShow("Envío de Reparto Finalizado", True)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -25,33 +25,34 @@ Library8=randomaccessfile
|
|||||||
Library9=sql
|
Library9=sql
|
||||||
ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="31"/>~\n~<supports-screens android:largeScreens="true" ~\n~ android:normalScreens="true" ~\n~ android:smallScreens="true" ~\n~ android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.LightTheme)~\n~'End of default text.~\n~~\n~SetApplicationAttribute(android:usesCleartextTraffic, "true")~\n~AddPermission(android.permission.INTERNET)~\n~AddPermission(android.permission.READ_EXTERNAL_STORAGE)~\n~AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)~\n~SetApplicationAttribute(android:allowBackup, "false")~\n~~\n~'AddActivityText(main,~\n~'<intent-filter>~\n~'<action android:name="android.intent.action.VIEW" />~\n~'<category android:name="android.intent.category.DEFAULT" />~\n~'<data android:mimeType="application/octet-stream" />~\n~'</intent-filter>)~\n~~\n~AddActivityText(main,~\n~<intent-filter>~\n~<action android:name="android.intent.action.VIEW" />~\n~<category android:name="android.intent.category.DEFAULT" />~\n~ <data android:mimeType="application/x-sqlite3" /> <!-- Para bases de datos -->~\n~ <data android:mimeType="application/octet-stream" /> <!-- Para otros archivos binarios -->~\n~ <data android:scheme="content" /> <!-- Filtra URIs tipo content:// -->~\n~</intent-filter>)
|
ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="31"/>~\n~<supports-screens android:largeScreens="true" ~\n~ android:normalScreens="true" ~\n~ android:smallScreens="true" ~\n~ android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.LightTheme)~\n~'End of default text.~\n~~\n~SetApplicationAttribute(android:usesCleartextTraffic, "true")~\n~AddPermission(android.permission.INTERNET)~\n~AddPermission(android.permission.READ_EXTERNAL_STORAGE)~\n~AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)~\n~SetApplicationAttribute(android:allowBackup, "false")~\n~~\n~'AddActivityText(main,~\n~'<intent-filter>~\n~'<action android:name="android.intent.action.VIEW" />~\n~'<category android:name="android.intent.category.DEFAULT" />~\n~'<data android:mimeType="application/octet-stream" />~\n~'</intent-filter>)~\n~~\n~AddActivityText(main,~\n~<intent-filter>~\n~<action android:name="android.intent.action.VIEW" />~\n~<category android:name="android.intent.category.DEFAULT" />~\n~ <data android:mimeType="application/x-sqlite3" /> <!-- Para bases de datos -->~\n~ <data android:mimeType="application/octet-stream" /> <!-- Para otros archivos binarios -->~\n~ <data android:scheme="content" /> <!-- Filtra URIs tipo content:// -->~\n~</intent-filter>)
|
||||||
Module1=B4XMainPage
|
Module1=B4XMainPage
|
||||||
Module10=C_Marquez
|
Module10=C_Kelloggs
|
||||||
Module11=C_Marquez_Reparto
|
Module11=C_Marquez
|
||||||
Module12=C_Mazapa
|
Module12=C_Marquez_Reparto
|
||||||
Module13=C_Mazapa_Reparto
|
Module13=C_Mazapa
|
||||||
Module14=C_Profina
|
Module14=C_Mazapa_Reparto
|
||||||
Module15=C_Profina_Reparto
|
Module15=C_Profina
|
||||||
Module16=DBRequestManager
|
Module16=C_Profina_Reparto
|
||||||
Module17=FileHandler
|
Module17=DBRequestManager
|
||||||
Module18=Starter
|
Module18=FileHandler
|
||||||
Module19=Subs
|
Module19=Starter
|
||||||
Module2=C_Durakelo
|
Module2=C_Durakelo
|
||||||
|
Module20=Subs
|
||||||
Module3=C_Durakelo_Reparto
|
Module3=C_Durakelo_Reparto
|
||||||
Module4=C_Envios
|
Module4=C_Envios
|
||||||
Module5=C_Guna_Reparto
|
Module5=C_Guna_Reparto
|
||||||
Module6=C_Intmex
|
Module6=C_ImportaBD
|
||||||
Module7=C_Intmex_Reparto
|
Module7=C_Intmex
|
||||||
Module8=C_Izca
|
Module8=C_Intmex_Reparto
|
||||||
Module9=C_Kelloggs
|
Module9=C_Izca
|
||||||
NumberOfFiles=6
|
NumberOfFiles=6
|
||||||
NumberOfLibraries=11
|
NumberOfLibraries=11
|
||||||
NumberOfModules=19
|
NumberOfModules=20
|
||||||
Version=12.8
|
Version=12.8
|
||||||
@EndOfDesignText@
|
@EndOfDesignText@
|
||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: DBCheck
|
#ApplicationLabel: DBCheck
|
||||||
#VersionCode: 1
|
#VersionCode: 1
|
||||||
#VersionName: 6.03.18
|
#VersionName: 6.03.19
|
||||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ ModuleBookmarks17=
|
|||||||
ModuleBookmarks18=
|
ModuleBookmarks18=
|
||||||
ModuleBookmarks19=
|
ModuleBookmarks19=
|
||||||
ModuleBookmarks2=
|
ModuleBookmarks2=
|
||||||
|
ModuleBookmarks20=
|
||||||
ModuleBookmarks3=
|
ModuleBookmarks3=
|
||||||
ModuleBookmarks4=
|
ModuleBookmarks4=
|
||||||
ModuleBookmarks5=
|
ModuleBookmarks5=
|
||||||
@@ -31,6 +32,7 @@ ModuleBreakpoints17=
|
|||||||
ModuleBreakpoints18=
|
ModuleBreakpoints18=
|
||||||
ModuleBreakpoints19=
|
ModuleBreakpoints19=
|
||||||
ModuleBreakpoints2=
|
ModuleBreakpoints2=
|
||||||
|
ModuleBreakpoints20=
|
||||||
ModuleBreakpoints3=
|
ModuleBreakpoints3=
|
||||||
ModuleBreakpoints4=
|
ModuleBreakpoints4=
|
||||||
ModuleBreakpoints5=
|
ModuleBreakpoints5=
|
||||||
@@ -39,25 +41,26 @@ ModuleBreakpoints7=
|
|||||||
ModuleBreakpoints8=
|
ModuleBreakpoints8=
|
||||||
ModuleBreakpoints9=
|
ModuleBreakpoints9=
|
||||||
ModuleClosedNodes0=
|
ModuleClosedNodes0=
|
||||||
ModuleClosedNodes1=2,6,7,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27
|
ModuleClosedNodes1=28,45
|
||||||
ModuleClosedNodes10=3,6
|
ModuleClosedNodes10=5,6,7,8
|
||||||
ModuleClosedNodes11=3
|
ModuleClosedNodes11=3,5,6
|
||||||
ModuleClosedNodes12=4
|
ModuleClosedNodes12=
|
||||||
ModuleClosedNodes13=3
|
ModuleClosedNodes13=5,6
|
||||||
ModuleClosedNodes14=
|
ModuleClosedNodes14=
|
||||||
ModuleClosedNodes15=3
|
ModuleClosedNodes15=4
|
||||||
ModuleClosedNodes16=
|
ModuleClosedNodes16=
|
||||||
ModuleClosedNodes17=
|
ModuleClosedNodes17=
|
||||||
ModuleClosedNodes18=1
|
ModuleClosedNodes18=
|
||||||
ModuleClosedNodes19=12,13,14
|
ModuleClosedNodes19=1
|
||||||
ModuleClosedNodes2=4,6,7
|
ModuleClosedNodes2=5,6
|
||||||
ModuleClosedNodes3=3
|
ModuleClosedNodes20=12,13,14
|
||||||
|
ModuleClosedNodes3=5
|
||||||
ModuleClosedNodes4=4,5
|
ModuleClosedNodes4=4,5
|
||||||
ModuleClosedNodes5=3
|
ModuleClosedNodes5=5
|
||||||
ModuleClosedNodes6=
|
ModuleClosedNodes6=
|
||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=4,5
|
||||||
ModuleClosedNodes8=3,4
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=5,6,7,8
|
ModuleClosedNodes9=
|
||||||
NavigationStack=B4XMainPage,B4XPage_Created,141,0,Main,Globals,21,0,C_Intmex_Reparto,Class_Globals,0,0,C_Intmex,Initialize,20,0,C_Intmex,envia,30,0,B4XMainPage,B4XPage_Appear,292,6,B4XMainPage,ActualizarEtiquetasReparto,581,6,C_Guna_Reparto,Class_Globals,9,0,C_Marquez,Initialize,17,0,C_Marquez,Class_Globals,10,0,Main,Process_Globals,19,0
|
NavigationStack=C_Intmex_Reparto,valida,296,0,C_Izca,envia,19,0,C_Kelloggs,ConfigurarYEnviar,36,0,C_Kelloggs,envia,43,0,C_Marquez_Reparto,valida,279,0,C_Mazapa_Reparto,valida,373,0,C_Profina,JobDone,352,0,C_Profina,envia,21,0,C_Profina_Reparto,valida,326,0,B4XMainPage,valida,1446,0,C_ImportaBD,Class_Globals,30,0
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=1,18,6,19,7,10,5
|
VisibleModules=1,19,7,11,2,5,20,13,3,8,6
|
||||||
|
|||||||
Reference in New Issue
Block a user