mirror of
https://github.com/KeymonSoft/DBCheck.git
synced 2026-04-17 19:37:09 +00:00
6/11/23 - Codigo para validar venta en servidor con panel de resultados
This commit is contained in:
@@ -75,6 +75,11 @@ Sub Class_Globals
|
|||||||
Dim c, d As Cursor
|
Dim c, d As Cursor
|
||||||
Dim foto1() As Byte
|
Dim foto1() As Byte
|
||||||
Private b_valida As Button
|
Private b_valida As Button
|
||||||
|
Private l_version As Label
|
||||||
|
Private p_validacion As Panel
|
||||||
|
Private l_vProds2 As Label
|
||||||
|
Private l_vPedidos2 As Label
|
||||||
|
Private l_vNoVenta2 As Label
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub Initialize
|
Public Sub Initialize
|
||||||
@@ -85,9 +90,12 @@ End Sub
|
|||||||
Sub B4XPage_Created (Root1 As B4XView)
|
Sub B4XPage_Created (Root1 As B4XView)
|
||||||
Root = Root1
|
Root = Root1
|
||||||
Root.LoadLayout("MainPage")
|
Root.LoadLayout("MainPage")
|
||||||
|
l_version.Text = Application.VersionName
|
||||||
p_principal.Width = Root.Width : p_principal.Height = Root.Height
|
p_principal.Width = Root.Width : p_principal.Height = Root.Height
|
||||||
Subs.centraPanel(p_datos, Root.Width)
|
Subs.centraPanel(p_datos, Root.Width)
|
||||||
reqManager.Initialize(Me, "http://keymon.lat:1782")
|
Subs.centraPanel(p_validacion, Root.Width)
|
||||||
|
p_validacion.Top = l_diasVenta.Top
|
||||||
|
reqManager.Initialize(Me, "http://keymon.lat:1781")
|
||||||
B4XPages.SetTitle(Me, "Revisión de BD")
|
B4XPages.SetTitle(Me, "Revisión de BD")
|
||||||
Subs.centraPanel(p_progressDialog, Root.Width)
|
Subs.centraPanel(p_progressDialog, Root.Width)
|
||||||
Subs.centraPanel(p_editaRuta, Root.Width)
|
Subs.centraPanel(p_editaRuta, Root.Width)
|
||||||
@@ -95,9 +103,10 @@ Sub B4XPage_Created (Root1 As B4XView)
|
|||||||
Subs.centraPanel(p_editaUsuario, Root.Width)
|
Subs.centraPanel(p_editaUsuario, Root.Width)
|
||||||
Subs.centraPanel(p_clientes, Root.Width)
|
Subs.centraPanel(p_clientes, Root.Width)
|
||||||
ime.Initialize("ime")
|
ime.Initialize("ime")
|
||||||
|
lv_DBRServer.AddSingleLine("http://keymon.lat:1781")
|
||||||
lv_DBRServer.AddSingleLine("http://keymon.lat:1782")
|
lv_DBRServer.AddSingleLine("http://keymon.lat:1782")
|
||||||
lv_DBRServer.AddSingleLine("http://40.123.36.38:1782")
|
lv_DBRServer.AddSingleLine("http://40.123.36.38:1782")
|
||||||
et_server.Text = "http://keymon.lat:1782"
|
et_server.Text = "http://keymon.lat:1781"
|
||||||
B_SERVER.Left = (Root.Width / 2) - (B_SERVER.Width / 2) 'Centramos B_SERVER
|
B_SERVER.Left = (Root.Width / 2) - (B_SERVER.Width / 2) 'Centramos B_SERVER
|
||||||
et_server.Left = (Root.Width / 2) - (et_server.Width / 2) 'Centramos et_server
|
et_server.Left = (Root.Width / 2) - (et_server.Width / 2) 'Centramos et_server
|
||||||
lv_DBRServer.Left = (Root.Width / 2) - (lv_DBRServer.Width / 2) 'Centramos lv_DBRServer
|
lv_DBRServer.Left = (Root.Width / 2) - (lv_DBRServer.Width / 2) 'Centramos lv_DBRServer
|
||||||
@@ -292,6 +301,7 @@ Sub JobDone(Job As HttpJob)
|
|||||||
If resultado.Tag = "valida_pedido" Then 'query tag
|
If resultado.Tag = "valida_pedido" Then 'query tag
|
||||||
For Each records() As Object In resultado.Rows
|
For Each records() As Object In resultado.Rows
|
||||||
Dim CUANTOSP As Int = records(resultado.Columns.Get("CUANTOSP"))
|
Dim CUANTOSP As Int = records(resultado.Columns.Get("CUANTOSP"))
|
||||||
|
l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||||
If cuantos_pedido <= CUANTOSP Then
|
If cuantos_pedido <= CUANTOSP Then
|
||||||
ToastMessageShow("INFO OK", True)
|
ToastMessageShow("INFO OK", True)
|
||||||
Else
|
Else
|
||||||
@@ -305,8 +315,8 @@ Sub JobDone(Job As HttpJob)
|
|||||||
If resultado.Tag = "valida_pedidoc" Then 'query tag
|
If resultado.Tag = "valida_pedidoc" Then 'query tag
|
||||||
For Each records() As Object In resultado.Rows
|
For Each records() As Object In resultado.Rows
|
||||||
Dim CUANTOSC As Int = records(resultado.Columns.Get("CUANTOSC"))
|
Dim CUANTOSC As Int = records(resultado.Columns.Get("CUANTOSC"))
|
||||||
If cuantos_pedidosc = CUANTOSC Then
|
l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||||
|
If cuantos_pedidosc <= CUANTOSC Then
|
||||||
Else
|
Else
|
||||||
ToastMessageShow($"No se cargo bien la info de pedido_cliente.${CRLF}Envíe nuevamente: "$ & CUANTOSC & "/" & cuantos_pedidosc, True)
|
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)
|
Log("No se cargo bien la info de pedido_cliente. Envíe nuevamente: " & CUANTOSC & "/" & cuantos_pedidosc)
|
||||||
@@ -317,8 +327,8 @@ Sub JobDone(Job As HttpJob)
|
|||||||
If resultado.Tag = "valida_noventa" Then 'query tag
|
If resultado.Tag = "valida_noventa" Then 'query tag
|
||||||
For Each records() As Object In resultado.Rows
|
For Each records() As Object In resultado.Rows
|
||||||
Dim CUANTOSN As Int = records(resultado.Columns.Get("CUANTOSN"))
|
Dim CUANTOSN As Int = records(resultado.Columns.Get("CUANTOSN"))
|
||||||
If cuantos_noventa = CUANTOSN Then
|
l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||||
|
If cuantos_noventa <= CUANTOSN Then
|
||||||
Else
|
Else
|
||||||
ToastMessageShow($"No se cargo bien la info de NoVenta.${CRLF}Envíe nuevamente: "$ & CUANTOSN & "/" & cuantos_noventa, True)
|
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)
|
Log("No se cargo bien la info de NoVenta. Envíe nuevamente:" & CUANTOSN & "/" & cuantos_noventa)
|
||||||
@@ -430,6 +440,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_validacion.Visible = False
|
||||||
ime.HideKeyboard
|
ime.HideKeyboard
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -987,6 +998,11 @@ End Sub
|
|||||||
|
|
||||||
Sub valida(identificador As String)
|
Sub valida(identificador As String)
|
||||||
Log("Validamos " & identificador)
|
Log("Validamos " & identificador)
|
||||||
|
If empresa.ToUpperCase = "GUNA" Then
|
||||||
|
reqManager.Initialize(Me, "http://keymon.lat:1782")
|
||||||
|
Else
|
||||||
|
reqManager.Initialize(Me, "http://keymon.lat:1781")
|
||||||
|
End If
|
||||||
d = skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
d = skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
||||||
d.Position = 0
|
d.Position = 0
|
||||||
Dim cuantos_noventa As String = d.GetString("CUANTOS_NOVENTA")
|
Dim cuantos_noventa As String = d.GetString("CUANTOS_NOVENTA")
|
||||||
@@ -1019,10 +1035,13 @@ Sub valida(identificador As String)
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub p_empresa_Click
|
Private Sub p_empresa_Click
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub b_valida_Click
|
Private Sub b_valida_Click
|
||||||
|
l_vPedidos2.Text = ""
|
||||||
|
l_vProds2.Text = ""
|
||||||
|
l_vNoVenta2.Text = ""
|
||||||
|
p_validacion.Visible = True
|
||||||
If empresa.ToUpperCase = "MARIANA" Then
|
If empresa.ToUpperCase = "MARIANA" Then
|
||||||
valida("MARDS")
|
valida("MARDS")
|
||||||
else if empresa.ToUpperCase = "GUNA" Then
|
else if empresa.ToUpperCase = "GUNA" Then
|
||||||
@@ -1030,4 +1049,11 @@ Private Sub b_valida_Click
|
|||||||
else if empresa.ToUpperCase = "INTMEX" Then
|
else if empresa.ToUpperCase = "INTMEX" Then
|
||||||
valida("INTMEX")
|
valida("INTMEX")
|
||||||
End If
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub p_engrane_Click
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub p_validacion_Click
|
||||||
|
p_validacion.Visible = False
|
||||||
End Sub
|
End Sub
|
||||||
@@ -55,7 +55,7 @@ Sub envioMariana 'ignore
|
|||||||
d.Position=0
|
d.Position=0
|
||||||
' Dim cuantos_pedidosc As String = D.GetString("CUANTOS_PEDIDOSC")
|
' Dim cuantos_pedidosc As String = D.GetString("CUANTOS_PEDIDOSC")
|
||||||
d.Close
|
d.Close
|
||||||
|
|
||||||
' ENVIO DE LOS CODIGOS QR
|
' ENVIO DE LOS CODIGOS QR
|
||||||
c = B4XPages.MainPage.skmt.ExecQuery("SELECT CODIGOKMTS, CODIGOB, LAT, LON FROM HIST_CODIGO_BARRAS" )
|
c = B4XPages.MainPage.skmt.ExecQuery("SELECT CODIGOKMTS, CODIGOB, LAT, LON FROM HIST_CODIGO_BARRAS" )
|
||||||
If c.RowCount>0 Then
|
If c.RowCount>0 Then
|
||||||
@@ -69,7 +69,7 @@ Sub envioMariana 'ignore
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
c.Close
|
c.Close
|
||||||
|
|
||||||
c = B4XPages.MainPage.skmt.ExecQuery("SELECT HE_CLIE, HE_RES, HE_FECHA, HE_TIPO FROM HIST_ENCUESTA")
|
c = B4XPages.MainPage.skmt.ExecQuery("SELECT HE_CLIE, HE_RES, HE_FECHA, HE_TIPO FROM HIST_ENCUESTA")
|
||||||
If c.RowCount>0 Then
|
If c.RowCount>0 Then
|
||||||
For i=0 To c.RowCount -1
|
For i=0 To c.RowCount -1
|
||||||
@@ -157,7 +157,7 @@ Sub envioMariana 'ignore
|
|||||||
' cmd.Name ="insert_drop_MARDS_2"
|
' cmd.Name ="insert_drop_MARDS_2"
|
||||||
' cmd.Parameters = Array As Object(usuario,ruta,sDate & sTime, l_porvisitar.Text,l_drop.Text,l_efectiva.Text,l_cuantosc.Text,l_cuantosn.Text, L_MONTOD.Text,"ENVIO",almacen)
|
' cmd.Parameters = Array As Object(usuario,ruta,sDate & sTime, l_porvisitar.Text,l_drop.Text,l_efectiva.Text,l_cuantosc.Text,l_cuantosn.Text, L_MONTOD.Text,"ENVIO",almacen)
|
||||||
' reqManager.ExecuteCommand(cmd , "inst_noventa")
|
' reqManager.ExecuteCommand(cmd , "inst_noventa")
|
||||||
ToastMessageShow("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias "& ruta , True)
|
ToastMessageShow("Se actualizaran los datos, este proceso podria tardar hasta un minuto, gracias "& ruta , True)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Version=12.5
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: DBCheck
|
#ApplicationLabel: DBCheck
|
||||||
#VersionCode: 1
|
#VersionCode: 1
|
||||||
#VersionName: 3.11.05
|
#VersionName: 3.11.06
|
||||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ ModuleBreakpoints4=
|
|||||||
ModuleBreakpoints5=
|
ModuleBreakpoints5=
|
||||||
ModuleBreakpoints6=
|
ModuleBreakpoints6=
|
||||||
ModuleClosedNodes0=2,6
|
ModuleClosedNodes0=2,6
|
||||||
ModuleClosedNodes1=8,9,10,11,12,13,14,15,16,17,18,20,21,22,24,25,26,27,28
|
ModuleClosedNodes1=25,26,27,28,29
|
||||||
ModuleClosedNodes2=5
|
ModuleClosedNodes2=5
|
||||||
ModuleClosedNodes3=
|
ModuleClosedNodes3=
|
||||||
ModuleClosedNodes4=
|
ModuleClosedNodes4=
|
||||||
ModuleClosedNodes5=1
|
ModuleClosedNodes5=1
|
||||||
ModuleClosedNodes6=12,13,14,16,17,18
|
ModuleClosedNodes6=12,13,14,16,17,18
|
||||||
NavigationStack=B4XMainPage,Class_Globals,70,0,B4XMainPage,i_engrane_Click,441,3,B4XMainPage,envioGuna,969,0,B4XMainPage,b_enviar_Click,231,0,B4XMainPage,b_valida_Click,1012,6,B4XMainPage,p_empresa_Click,1005,0,B4XMainPage,valida,974,6,B4XMainPage,sp_empresa_ItemClick,464,6,B4XMainPage,B4XPage_Appear,217,4,B4XMainPage,JobDone,296,6
|
NavigationStack=B4XMainPage,JobDone,307,6,B4XMainPage,B4XPage_Appear,224,0,B4XMainPage,b_enviar_Click,248,0,Visual Designer,MainPage.bal,-100,6,B4XMainPage,valida,995,6,B4XMainPage,envioGuna,991,0,B4XMainPage,envioMariana,614,0,B4XMainPage,envioIntmex,766,0,B4XMainPage,p_empresa_Click,1030,0,B4XMainPage,b_valida_Click,1033,0
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=1,6,2
|
VisibleModules=1,6,2,3
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user