mirror of
https://github.com/KeymonSoft/Intmex_Multiventa.git
synced 2026-04-19 05:39:19 +00:00
- VERSION 5.05.11
- Se agrego en "Principal" que cuando haya pedidos pendientes, aparezca un mensaje y el estatus del envio de los pedidos. - Se agregó en "Principal" un icono de "conexion" en la esquina superior derecha, que dependiendo de la conexion se pone verde o rojo. - Se agrego la version y el estatus de la conexion a tmp_drop. - Se agrego la version y el estatus de la conexion a la ubicacion em tiempo real (CAT_RUTAS)
This commit is contained in:
@@ -214,6 +214,10 @@ Sub Class_Globals
|
||||
Private L_VENTA As Label
|
||||
Private L_PREVENTA As Label
|
||||
Dim validador As C_Validador
|
||||
Dim p_muestraPendientes As Panel
|
||||
Private b_muestraPendientes As Button
|
||||
' Dim p_conexion As Panel
|
||||
Dim l_conexion As Label
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -228,7 +232,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
Root.LoadLayout("principal")
|
||||
rd.Initialize
|
||||
rd.vacuum
|
||||
validador.Initialize
|
||||
validador.Initialize(Me, "val")
|
||||
EJECUTANDO=1
|
||||
Dim ruta As String
|
||||
img2.Visible =False
|
||||
@@ -301,6 +305,10 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
l_rutasuplencia.Text = s.GetString("RS_RUTA")
|
||||
End If
|
||||
Starter.Skmt.ExecNonQuery($"create table if not exists kmt_info2 (${getTableColumnList(Starter.skmt, "kmt_info")})"$)
|
||||
p_mandaInfo.Left = 0: p_mandaInfo.top = 0
|
||||
p_muestraPendientes.Left = Root.Width - p_muestraPendientes.Width - 5dip
|
||||
' p_conexion.Top = 1 : p_conexion.left = Root.width - p_conexion.width
|
||||
l_conexion.Top = 0 : l_conexion.left = Root.width - l_conexion.width -2
|
||||
End Sub
|
||||
|
||||
Sub chkIfTableExists(db As SQL, table As String) As Boolean 'ignore
|
||||
@@ -490,8 +498,6 @@ Sub B4XPage_Appear
|
||||
c.Close
|
||||
bu.Initialize
|
||||
batterystatus = bu.BatteryInformation
|
||||
|
||||
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select usuario from usuarioa")
|
||||
c.Position = 0
|
||||
usuario = c.GetString("USUARIO")
|
||||
@@ -503,38 +509,47 @@ Sub B4XPage_Appear
|
||||
B4XPages.MainPage.clientesvisitados = l_porvisitar.TEXT
|
||||
B4XPages.MainPage.ALMACEN = ALMACEN
|
||||
B4XPages.MainPage.rutapreventa = l_ruta.text
|
||||
|
||||
'////// Para el usuario global - Chv
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select usuario from usuarioa")
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select usuario from usuarioa")
|
||||
c.Position = 0
|
||||
usuario = c.GetString("USUARIO")
|
||||
B4XPages.MainPage.usuario = usuario
|
||||
c.Close
|
||||
'///////
|
||||
CallSub(Starter, "ENVIA_ULTIMA_GPS")
|
||||
|
||||
|
||||
s = B4XPages.MainPage.skmt.ExecQuery("select RS_RUTA FROM RUTA_SUPLENCIA")
|
||||
s.Position = 0
|
||||
If s.RowCount = 0 Then
|
||||
|
||||
Label22.Visible = False
|
||||
l_rutasuplencia.Visible = False
|
||||
l_rutasuplencia.Text = ""
|
||||
|
||||
Else If s.RowCount > 0 Then
|
||||
|
||||
Label22.Visible = True
|
||||
l_rutasuplencia.Visible = True
|
||||
l_rutasuplencia.Text = s.GetString("RS_RUTA")
|
||||
|
||||
End If
|
||||
|
||||
' If l_ruta.Text = "0" Then
|
||||
' b_abordo.Visible = False
|
||||
' Else
|
||||
' b_abordo.Visible = True
|
||||
' End If
|
||||
Dim RedDisponible As Phone
|
||||
Log("GetNetworkOperatorName: "&RedDisponible.GetNetworkOperatorName)
|
||||
Log("GetNetworkType: "&RedDisponible.GetNetworkType)
|
||||
Log("GetPhoneType: "&RedDisponible.GetPhoneType)
|
||||
' If RedDisponible.GetNetworkOperatorName <> "" And RedDisponible.GetNetworkType <> "UNKNOWN" Then
|
||||
' Log("Red Disponible")
|
||||
' Else
|
||||
' Log("Red no disponible")
|
||||
' End If
|
||||
Log("GetDataState: " & RedDisponible.GetDataState)
|
||||
Log("IsAirplaneModeOn: " & RedDisponible.IsAirplaneModeOn)
|
||||
Log("|" & validador.buscaSinEnviar & "|")
|
||||
If validador.buscaSinEnviar > 0 Then
|
||||
p_muestraPendientes.Visible = True
|
||||
b_muestraPendientes.Enabled = True
|
||||
b_muestraPendientes.text = "Enviar"
|
||||
Else
|
||||
p_muestraPendientes.Visible = False
|
||||
End If
|
||||
validador.iniciaValidacion
|
||||
End Sub
|
||||
|
||||
@@ -737,8 +752,8 @@ Sub Subir_Click
|
||||
sTime=DateTime.Time(DateTime.Now)
|
||||
Dim cmd As DBCommand
|
||||
cmd.Initialize
|
||||
cmd.Name ="insert_drop_INTMEX_2"
|
||||
cmd.Parameters = Array As Object(usuario,l_ruta.Text,sDate & sTime, l_porvisitar.Text,l_drop.Text,l_efectiva.Text,l_cuantosc.Text,l_cuantosn.Text, L_MONTOD.Text,"ENVIO",ALMACEN)
|
||||
cmd.Name ="insert_drop_INTMEX_3"
|
||||
cmd.Parameters = Array As Object(usuario,l_ruta.Text,sDate & sTime, l_porvisitar.Text,l_drop.Text,l_efectiva.Text,l_cuantosc.Text,l_cuantosn.Text, L_MONTOD.Text,"ENVIO",ALMACEN, Application.VersionName, Starter.senial)
|
||||
reqManager.ExecuteCommand(cmd , "inst_noventa")
|
||||
img2.Visible =True
|
||||
PORCENTAJE = Round(100/ (cuantos_noventa + cuantos_pedido + cuantos_pedidosc + 1))
|
||||
@@ -876,8 +891,8 @@ Sub cargar_Click
|
||||
' imei = P.GetDeviceId
|
||||
imei = "xxxx"
|
||||
cmd.Initialize
|
||||
cmd.Name ="insert_drop_INTMEX_2"
|
||||
cmd.Parameters = Array As Object(usuario,e_ruta.text,sDate,imei,sTime,"","","","","CARGA",ALMACEN)
|
||||
cmd.Name ="insert_drop_INTMEX_3"
|
||||
cmd.Parameters = Array As Object(usuario,e_ruta.text,sDate,imei,sTime,"","","","","CARGA",ALMACEN, Application.VersionName, Starter.senial)
|
||||
reqManager.ExecuteCommand(cmd , "inst_noventa")
|
||||
|
||||
cmd.Initialize
|
||||
@@ -2665,4 +2680,35 @@ Private Sub b_abordo_Click
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("0"))
|
||||
B4XPages.MainPage.tipo_venta = "ABORDO"
|
||||
B4XPages.ShowPage("Productos")
|
||||
End Sub
|
||||
|
||||
Private Sub b_muestraPendientes_Click
|
||||
validador.iniciaValidacion
|
||||
b_muestraPendientes.Enabled = False
|
||||
b_muestraPendientes.TextColor = Colors.white
|
||||
B4XPages.ShowPage("ticketsDia")
|
||||
End Sub
|
||||
|
||||
Sub val_Guardando(msg As String)
|
||||
Log("##################################################" & CRLF & msg)
|
||||
b_muestraPendientes.Enabled = False
|
||||
b_muestraPendientes.TextColor = Colors.white
|
||||
b_muestraPendientes.Text = msg
|
||||
End Sub
|
||||
|
||||
Sub val_Enviando(msg As String)
|
||||
Log("##################################################" & CRLF & msg)
|
||||
b_muestraPendientes.Text = msg
|
||||
End Sub
|
||||
|
||||
Sub val_Validando(msg As String)
|
||||
Log("##################################################" & CRLF & msg)
|
||||
b_muestraPendientes.Text = msg
|
||||
End Sub
|
||||
|
||||
Sub val_Terminado(msg As String)
|
||||
Log("##################################################" & CRLF & msg)
|
||||
b_muestraPendientes.Text = msg
|
||||
Sleep (1000)
|
||||
p_muestraPendientes.Visible = False
|
||||
End Sub
|
||||
Reference in New Issue
Block a user