mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 03:49:14 +00:00
19/10/23 - Se agregó bitacora a entrada y salida de cliente
This commit is contained in:
@@ -59,7 +59,7 @@ Sub Class_Globals
|
|||||||
Dim la_col As Label
|
Dim la_col As Label
|
||||||
Dim la_cp As Label
|
Dim la_cp As Label
|
||||||
Dim la_zona As Label
|
Dim la_zona As Label
|
||||||
Dim gest As Button
|
' Dim gest As Button
|
||||||
Dim la_saldotot As Label
|
Dim la_saldotot As Label
|
||||||
Dim la_saldooper As Label
|
Dim la_saldooper As Label
|
||||||
Dim b_noVenta As Button
|
Dim b_noVenta As Button
|
||||||
@@ -74,9 +74,9 @@ Sub Class_Globals
|
|||||||
Dim l_entre2 As Label
|
Dim l_entre2 As Label
|
||||||
Dim l_atiende As Label
|
Dim l_atiende As Label
|
||||||
Dim l_atiende2 As Label
|
Dim l_atiende2 As Label
|
||||||
Dim DATOS As Button
|
' Dim DATOS As Button
|
||||||
Dim Guardar As Button
|
Dim Guardar As Button
|
||||||
Dim NUEVO As Button
|
' Dim NUEVO As Button
|
||||||
Dim l_total As Label
|
Dim l_total As Label
|
||||||
Dim c2 As Cursor
|
Dim c2 As Cursor
|
||||||
Dim S2 As Cursor
|
Dim S2 As Cursor
|
||||||
@@ -87,7 +87,7 @@ Sub Class_Globals
|
|||||||
Private META As String
|
Private META As String
|
||||||
Private META2 As String
|
Private META2 As String
|
||||||
Private VERIFICA As String
|
Private VERIFICA As String
|
||||||
Private L_QR As Label
|
' Private L_QR As Label
|
||||||
Private BT_QR As Button
|
Private BT_QR As Button
|
||||||
Private qr As QRCode
|
Private qr As QRCode
|
||||||
Dim sc As Zxing_scanner
|
Dim sc As Zxing_scanner
|
||||||
@@ -101,7 +101,7 @@ Sub Class_Globals
|
|||||||
Dim sucursal As String
|
Dim sucursal As String
|
||||||
Dim FACTURA As String
|
Dim FACTURA As String
|
||||||
Dim CREDITO As String
|
Dim CREDITO As String
|
||||||
Private b_factura As Button
|
' Private b_factura As Button
|
||||||
Dim perfil As String
|
Dim perfil As String
|
||||||
Private CH_TA As CheckBox
|
Private CH_TA As CheckBox
|
||||||
Private CH_TC As CheckBox
|
Private CH_TC As CheckBox
|
||||||
@@ -110,7 +110,7 @@ Sub Class_Globals
|
|||||||
Private E_CUANTOS_E As EditText
|
Private E_CUANTOS_E As EditText
|
||||||
Private B_GUARDAR As Button
|
Private B_GUARDAR As Button
|
||||||
Private TIPOEX As String
|
Private TIPOEX As String
|
||||||
Private B_EXIBI As Button
|
' Private B_EXIBI As Button
|
||||||
Private Panel1 As Panel
|
Private Panel1 As Panel
|
||||||
Dim t3 As Timer
|
Dim t3 As Timer
|
||||||
'--***---- BOLETA DE LIQUIDACION
|
'--***---- BOLETA DE LIQUIDACION
|
||||||
@@ -277,6 +277,8 @@ Sub Class_Globals
|
|||||||
Private BP_DOE_R1 As Button
|
Private BP_DOE_R1 As Button
|
||||||
Dim RMI_VALOR As String
|
Dim RMI_VALOR As String
|
||||||
Dim errorImpresora As Int = 0
|
Dim errorImpresora As Int = 0
|
||||||
|
Private b_inicioFinVenta As Button
|
||||||
|
dim dentroDeGeocerca as Boolean = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'You can add more parameters here.
|
'You can add more parameters here.
|
||||||
@@ -361,11 +363,19 @@ 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(Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
|
' Log(Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
|
||||||
|
b_inicioFinVenta.Text = "INICIAR VENTA"
|
||||||
|
b_inicioFinVenta.BringToFront
|
||||||
|
If Not(Starter.enVenta) Then
|
||||||
|
b_inicioFinVenta.Visible = True
|
||||||
|
' Log("EnVenta Visible")
|
||||||
|
Else
|
||||||
|
' Log("EnVenta NO Visible")
|
||||||
|
b_inicioFinVenta.Visible = False
|
||||||
|
End If
|
||||||
reqManager.Initialize(Me, Starter.DBReqServer)
|
reqManager.Initialize(Me, Starter.DBReqServer)
|
||||||
' Log(Subs.traeUltimaActividadBD)
|
' Log(Subs.traeUltimaActividadBD)
|
||||||
Subs.panelVisibleCompleto(P_INF_GENERAL, Root)
|
|
||||||
' P_INF_GENERAL.Height = Root.Height
|
' P_INF_GENERAL.Height = Root.Height
|
||||||
' P_INF_GENERAL.Width = Root.Width
|
' P_INF_GENERAL.Width = Root.Width
|
||||||
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
||||||
@@ -379,7 +389,8 @@ Sub B4XPage_Appear
|
|||||||
Starter.MAC_IMPRESORA = MAC_IMPRESORA
|
Starter.MAC_IMPRESORA = MAC_IMPRESORA
|
||||||
et_geopass.Text = ""
|
et_geopass.Text = ""
|
||||||
If Subs.traeUltimaActividadBD <> "Cliente" Then Subs.iniciaActividad(Subs.traeUltimaActividadBD)
|
If Subs.traeUltimaActividadBD <> "Cliente" Then Subs.iniciaActividad(Subs.traeUltimaActividadBD)
|
||||||
If Not(muestraBoleta) Then P_INF_GENERAL.Visible = True
|
Log($"MUESTRA BOLETA ${muestraBoleta}"$)
|
||||||
|
If Not(muestraBoleta) Then Subs.panelVisibleCompleto(P_INF_GENERAL, Root)
|
||||||
p_pideGeoPass.Visible = False
|
p_pideGeoPass.Visible = False
|
||||||
' If Logger Then Log(muestraBoleta)
|
' If Logger Then Log(muestraBoleta)
|
||||||
CallSubDelayed(Tracker, "StartFLP2")
|
CallSubDelayed(Tracker, "StartFLP2")
|
||||||
@@ -394,7 +405,7 @@ Sub B4XPage_Appear
|
|||||||
End If
|
End If
|
||||||
If muestraBoleta Then LLAMA_BOLETA
|
If muestraBoleta Then LLAMA_BOLETA
|
||||||
BT_QR.Enabled = False
|
BT_QR.Enabled = False
|
||||||
b_factura.Visible = False
|
' b_factura.Visible = False
|
||||||
Panel_INV_A.Visible = False
|
Panel_INV_A.Visible = False
|
||||||
CREDITO_DISPONIBLE =0
|
CREDITO_DISPONIBLE =0
|
||||||
If Starter.boleta = 0 Then
|
If Starter.boleta = 0 Then
|
||||||
@@ -457,17 +468,17 @@ Sub B4XPage_Appear
|
|||||||
If CREDITO = "1" Then
|
If CREDITO = "1" Then
|
||||||
Msgbox("ALTO","A este cliente no se le puede vender ya que tienen adeudo en su crédito") 'ignore
|
Msgbox("ALTO","A este cliente no se le puede vender ya que tienen adeudo en su crédito") 'ignore
|
||||||
B_VENTA.Visible = False
|
B_VENTA.Visible = False
|
||||||
gest.Visible = False
|
' gest.Visible = False
|
||||||
Else
|
Else
|
||||||
B_VENTA.Visible = True
|
B_VENTA.Visible = True
|
||||||
gest.Visible = True
|
' gest.Visible = True
|
||||||
End If
|
End If
|
||||||
' Msgbox(c.GetString("CAT_CL_NUM_SERIEFISICO"),"AVISO")
|
' Msgbox(c.GetString("CAT_CL_NUM_SERIEFISICO"),"AVISO")
|
||||||
If c.GetString("CAT_CL_NUM_SERIEFISICO") = "0" Then
|
' If c.GetString("CAT_CL_NUM_SERIEFISICO") = "0" Then
|
||||||
L_QR.Visible = True
|
' L_QR.Visible = True
|
||||||
Else
|
' Else
|
||||||
L_QR.Visible = False
|
' L_QR.Visible = False
|
||||||
End If
|
' End If
|
||||||
S2=Starter.skmt.ExecQuery("select count(*) AS CUANTOS from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")
|
S2=Starter.skmt.ExecQuery("select count(*) AS CUANTOS from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||||
S2.Position =0
|
S2.Position =0
|
||||||
CUANTOS = S2.GetString("CUANTOS")
|
CUANTOS = S2.GetString("CUANTOS")
|
||||||
@@ -502,10 +513,10 @@ Sub B4XPage_Appear
|
|||||||
If C3.GetString("CUANTOS") > 0 Then
|
If C3.GetString("CUANTOS") > 0 Then
|
||||||
c2=Starter.skmt.ExecQuery2("SELECT CAT_GP_NOMBRE FROM CAT_GUNAPROD2 WHERE CAT_GP_ID = ? ", Array As String(C1.GetString("HCCP_PROMO")))
|
c2=Starter.skmt.ExecQuery2("SELECT CAT_GP_NOMBRE FROM CAT_GUNAPROD2 WHERE CAT_GP_ID = ? ", Array As String(C1.GetString("HCCP_PROMO")))
|
||||||
c2.Position = 0
|
c2.Position = 0
|
||||||
MsgboxAsync("El cliente tiene derecho a una promo especial "& c2.GetString("CAT_GP_NOMBRE"),"Aviso") 'ignore
|
If Not(Subs.hayPedido) Then MsgboxAsync("El cliente tiene derecho a una promo especial "& c2.GetString("CAT_GP_NOMBRE"),"Aviso") 'ignore
|
||||||
c2.Close
|
c2.Close
|
||||||
Else
|
Else
|
||||||
MsgboxAsync("El cliente tiene derecho a una promo especial ","Aviso") 'ignore
|
If Not(Subs.hayPedido) Then MsgboxAsync("El cliente tiene derecho a una promo especial ","Aviso") 'ignore
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
C3.Close
|
C3.Close
|
||||||
@@ -521,7 +532,7 @@ Sub B4XPage_Appear
|
|||||||
Else
|
Else
|
||||||
Cuestionario
|
Cuestionario
|
||||||
End If
|
End If
|
||||||
Log("IMPRESO:" & Subs.revisaImpresa)
|
Log("IMPRESO: " & Subs.revisaImpresa)
|
||||||
If YA_IMPRIMIO2 = 0 Then
|
If YA_IMPRIMIO2 = 0 Then
|
||||||
Guardar.Visible = False
|
Guardar.Visible = False
|
||||||
Else
|
Else
|
||||||
@@ -545,7 +556,7 @@ Sub B4XPage_Appear
|
|||||||
End If
|
End If
|
||||||
If l_total.Text <> Null And mPromoEspecial.Get("montoPromo") <> Null And l_total.text >= mPromoEspecial.Get("montoPromo") Then
|
If l_total.Text <> Null And mPromoEspecial.Get("montoPromo") <> Null And l_total.text >= mPromoEspecial.Get("montoPromo") Then
|
||||||
If logger Then Log("Promo Autorizada")
|
If logger Then Log("Promo Autorizada")
|
||||||
res = Msgbox2("Pomocion '" & mPromoEspecial.Get("descrPromo") & "' disponible.\nSi se otorga la promoción ya NO será posible modificar la venta.", "PROMO DISPONIBLE", "Si", "", "No", Null) 'ignore
|
res = Msgbox2("Promocion '" & mPromoEspecial.Get("descrPromo") & "' disponible.\nSi se otorga la promoción ya NO será posible modificar la venta.", "PROMO DISPONIBLE", "Si", "", "No", Null) 'ignore
|
||||||
If res = DialogResponse.POSITIVE Then
|
If res = DialogResponse.POSITIVE Then
|
||||||
If logger Then Log("Promocion aceptada.")
|
If logger Then Log("Promocion aceptada.")
|
||||||
If logger Then Log($"${mPromoEspecial.Get("idProd")}, ${mPromoEspecial.Get("idPromo")}, ${mPromoEspecial.Get("cantProd")}, ${mPromoEspecial.Get("nombreProd")}, ${mPromoEspecial.Get("descrPromo")}, ${la_cuenta.Text}, ${usuario}, ${ruta_tienda}"$)
|
If logger Then Log($"${mPromoEspecial.Get("idProd")}, ${mPromoEspecial.Get("idPromo")}, ${mPromoEspecial.Get("cantProd")}, ${mPromoEspecial.Get("nombreProd")}, ${mPromoEspecial.Get("descrPromo")}, ${la_cuenta.Text}, ${usuario}, ${ruta_tienda}"$)
|
||||||
@@ -619,7 +630,6 @@ Sub B4XPage_Appear
|
|||||||
' Log($"Tenemos UUC: ${Tracker.FLP.GetLastKnownLocation.Latitude},${Tracker.FLP.GetLastKnownLocation.Longitude}"$)
|
' Log($"Tenemos UUC: ${Tracker.FLP.GetLastKnownLocation.Latitude},${Tracker.FLP.GetLastKnownLocation.Longitude}"$)
|
||||||
GPS_LocationChanged(Tracker.FLP.GetLastKnownLocation)
|
GPS_LocationChanged(Tracker.FLP.GetLastKnownLocation)
|
||||||
End If
|
End If
|
||||||
muestraBoleta = False
|
|
||||||
' Log(Subs.revisaImpresa)
|
' Log(Subs.revisaImpresa)
|
||||||
If l_total.text <> "null" And l_total.text <> "" And l_total.text <> Null Then
|
If l_total.text <> "null" And l_total.text <> "" And l_total.text <> Null Then
|
||||||
B_IMP2.Enabled = True
|
B_IMP2.Enabled = True
|
||||||
@@ -678,7 +688,13 @@ Sub GPS_LocationChanged (Location1 As Location)
|
|||||||
End If
|
End If
|
||||||
laDist= Location1.DistanceTo(ubicacionTienda)
|
laDist= Location1.DistanceTo(ubicacionTienda)
|
||||||
l_ubicacion2.Text = $"Dist: $1.0{laDist} mts."$
|
l_ubicacion2.Text = $"Dist: $1.0{laDist} mts."$
|
||||||
If laDist > 300 Then l_ubicacion2.TextColor = Colors.Red Else l_ubicacion2.TextColor = Colors.Black
|
If laDist > 300 Then
|
||||||
|
l_ubicacion2.TextColor = Colors.Red
|
||||||
|
dentroDeGeocerca = False
|
||||||
|
Else
|
||||||
|
l_ubicacion2.TextColor = Colors.Black
|
||||||
|
dentroDeGeocerca = True
|
||||||
|
End If
|
||||||
|
|
||||||
'''' GEO CERCA
|
'''' GEO CERCA
|
||||||
'''' esto es para la geocerca validar tambien el las variables del whats y del no venta que las borra si existe venta
|
'''' esto es para la geocerca validar tambien el las variables del whats y del no venta que las borra si existe venta
|
||||||
@@ -696,7 +712,7 @@ Sub GPS_LocationChanged (Location1 As Location)
|
|||||||
|
|
||||||
Dim distance As Long
|
Dim distance As Long
|
||||||
distance = l1.DistanceTo(l2) ' resultado en metros
|
distance = l1.DistanceTo(l2) ' resultado en metros
|
||||||
gest.Visible = True
|
' gest.Visible = True
|
||||||
' gps_boton_doe ="1"
|
' gps_boton_doe ="1"
|
||||||
' LogColor($"Distancia actual: ${distance}"$, Colors.Blue)
|
' LogColor($"Distancia actual: ${distance}"$, Colors.Blue)
|
||||||
If distance <= 5000000 Or usuario = "KMTSKLL1" Or la_cuenta.Text = "0" Then
|
If distance <= 5000000 Or usuario = "KMTSKLL1" Or la_cuenta.Text = "0" Then
|
||||||
@@ -718,7 +734,7 @@ End Sub
|
|||||||
|
|
||||||
Sub gest_Click
|
Sub gest_Click
|
||||||
Starter.tipov = "PREVENTA"
|
Starter.tipov = "PREVENTA"
|
||||||
Subs.iniciaActividad("Productos")
|
' Subs.iniciaActividad("Productos")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub b_noVenta_Click
|
Sub b_noVenta_Click
|
||||||
@@ -728,6 +744,7 @@ End Sub
|
|||||||
Private Sub B4XPage_CloseRequest As ResumableSub
|
Private Sub B4XPage_CloseRequest As ResumableSub
|
||||||
' BACK key pressed
|
' BACK key pressed
|
||||||
'Return True to close, False to cancel
|
'Return True to close, False to cancel
|
||||||
|
muestraBoleta = False
|
||||||
If PNL_TOTALES.Visible Then
|
If PNL_TOTALES.Visible Then
|
||||||
PNL_TOTALES.Visible = False
|
PNL_TOTALES.Visible = False
|
||||||
P_BOLETA.Visible = False
|
P_BOLETA.Visible = False
|
||||||
@@ -816,12 +833,15 @@ Sub Guardar_Click
|
|||||||
B4XPages.MainPage.productos.reiniciarlistaProds = True
|
B4XPages.MainPage.productos.reiniciarlistaProds = True
|
||||||
B4XPages.MainPage.productos.prodsMap.Initialize
|
B4XPages.MainPage.productos.prodsMap.Initialize
|
||||||
B4XPages.MainPage.promos.promosMap.Initialize
|
B4XPages.MainPage.promos.promosMap.Initialize
|
||||||
Subs.iniciaActividad("principal")
|
' Subs.iniciaActividad("principal")
|
||||||
B4XPages.ShowPageAndRemovePreviousPages("Principal")
|
' B4XPages.ShowPageAndRemovePreviousPages("Principal")
|
||||||
|
Guardar.SendToBack
|
||||||
|
b_inicioFinVenta.Text = "TERMINAR VENTA"
|
||||||
|
b_inicioFinVenta.Visible = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub NUEVO_Click
|
Sub NUEVO_Click
|
||||||
Subs.iniciaActividad("nuevocliente")
|
' Subs.iniciaActividad("nuevocliente")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub HIST_Click
|
Sub HIST_Click
|
||||||
@@ -2126,9 +2146,9 @@ Sub B_GUARDAR_Click
|
|||||||
ELSE If CH_TD.Checked = True Then
|
ELSE If CH_TD.Checked = True Then
|
||||||
TIPOEX = "TIPO D"
|
TIPOEX = "TIPO D"
|
||||||
End If
|
End If
|
||||||
Panel1.Visible = False
|
' Panel1.Visible = False
|
||||||
B_EXIBI.Visible = True
|
' B_EXIBI.Visible = True
|
||||||
b_factura.Visible = True
|
' b_factura.Visible = True
|
||||||
HIST.Visible = True
|
HIST.Visible = True
|
||||||
c=Starter.skmt.ExecQuery("select CUENTA from cuentaa")
|
c=Starter.skmt.ExecQuery("select CUENTA from cuentaa")
|
||||||
c.Position = 0
|
c.Position = 0
|
||||||
@@ -2137,10 +2157,10 @@ Sub B_GUARDAR_Click
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub B_EXIBI_Click
|
Sub B_EXIBI_Click
|
||||||
Panel1.Visible = True
|
' Panel1.Visible = True
|
||||||
B_EXIBI.Visible = False
|
' B_EXIBI.Visible = False
|
||||||
b_factura.Visible = False
|
' b_factura.Visible = False
|
||||||
HIST.Visible = False
|
' HIST.Visible = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'''''''''''''''''''''''''''''''''''''' BOLETA DE LIQUIDACION
|
'''''''''''''''''''''''''''''''''''''' BOLETA DE LIQUIDACION
|
||||||
@@ -2678,6 +2698,7 @@ Sub LBL_REGRESA_Click
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub B_Regresar_Click
|
Sub B_Regresar_Click
|
||||||
|
muestraBoleta = False
|
||||||
' StartActivity("SELECCION")
|
' StartActivity("SELECCION")
|
||||||
Subs.iniciaActividad("principal")
|
Subs.iniciaActividad("principal")
|
||||||
' B4XPages.ShowPage("Principal")
|
' B4XPages.ShowPage("Principal")
|
||||||
@@ -2692,7 +2713,6 @@ Sub B_Regresar_Click
|
|||||||
P_INF_GENERAL.Visible=True
|
P_INF_GENERAL.Visible=True
|
||||||
If logger Then Log("Panel general="&P_INF_GENERAL.Visible)
|
If logger Then Log("Panel general="&P_INF_GENERAL.Visible)
|
||||||
LBL_REGRESA.Visible=False
|
LBL_REGRESA.Visible=False
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub IMG_IMPRESORA_Click
|
Sub IMG_IMPRESORA_Click
|
||||||
@@ -3406,6 +3426,7 @@ Sub B_CERRAR_I_Click
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub Bt_GuardarBoleta_Click
|
Sub Bt_GuardarBoleta_Click
|
||||||
|
muestraBoleta = False
|
||||||
DateTime.DateFormat = "MM/dd/yyyy"
|
DateTime.DateFormat = "MM/dd/yyyy"
|
||||||
sDate=DateTime.Date(DateTime.Now)
|
sDate=DateTime.Date(DateTime.Now)
|
||||||
sTime=DateTime.Time(DateTime.Now)
|
sTime=DateTime.Time(DateTime.Now)
|
||||||
@@ -3419,6 +3440,7 @@ Sub Bt_GuardarBoleta_Click
|
|||||||
' If Logger Then Log($"${RutaBoleta},${Id_Almacen},${EDT_CANMIL.Text},${EDT_CANQUIN.Text},${EDT_CANDOS.Text},${EDT_CANCIEN.Text},${EDT_CANCIN.Text},${EDT_CANVEIN.Text}"$)
|
' If Logger Then Log($"${RutaBoleta},${Id_Almacen},${EDT_CANMIL.Text},${EDT_CANQUIN.Text},${EDT_CANDOS.Text},${EDT_CANCIEN.Text},${EDT_CANCIN.Text},${EDT_CANVEIN.Text}"$)
|
||||||
' If Logger Then Log($"${RutaBoleta},${Id_Almacen},${EDT_CANVEINTE.Text},${EDT_CANDIEZ.Text},${EDT_CANCI.Text},${EDT_CANDO.Text},${EDT_CANUN.Text},${EDT_CANCEN.Text}"$)
|
' If Logger Then Log($"${RutaBoleta},${Id_Almacen},${EDT_CANVEINTE.Text},${EDT_CANDIEZ.Text},${EDT_CANCI.Text},${EDT_CANDO.Text},${EDT_CANUN.Text},${EDT_CANCEN.Text}"$)
|
||||||
Msgbox("Datos Guardados ","Listo") 'ignore
|
Msgbox("Datos Guardados ","Listo") 'ignore
|
||||||
|
Subs.bitacora(usuario, Id_Almacen, ruta_tienda, "Llega a almacen", la_cuenta.text, Subs.fechanormal(DateTime.Now), "", Starter.lat_gps, Starter.lon_gps, "2", "", "")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub B_E_NEXT_Click
|
Sub B_E_NEXT_Click
|
||||||
@@ -3857,3 +3879,18 @@ Private Sub BP_DOE_R1_Click
|
|||||||
Starter.skmt.ExecNonQuery("delete from pedido_DOE where pe_cliente in (Select CUENTA from cuentaa)")
|
Starter.skmt.ExecNonQuery("delete from pedido_DOE where pe_cliente in (Select CUENTA from cuentaa)")
|
||||||
p_doe.Visible = False
|
p_doe.Visible = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub b_inicioFinVenta_Click
|
||||||
|
Private precision As Int = 0
|
||||||
|
If dentroDeGeocerca Then precision = 1
|
||||||
|
If Starter.enVenta Then
|
||||||
|
Subs.bitacora(usuario, Id_Almacen, ruta_tienda, "Termina Venta", la_cuenta.text, "", Subs.fechanormal(DateTime.Now), Starter.lat_gps, Starter.lon_gps, precision, "", "")
|
||||||
|
Starter.enVenta = False
|
||||||
|
Subs.iniciaActividad("principal")
|
||||||
|
B4XPages.ShowPageAndRemovePreviousPages("Principal")
|
||||||
|
Else
|
||||||
|
Subs.bitacora(usuario, Id_Almacen, ruta_tienda, "Inicia Venta", la_cuenta.text, Subs.fechanormal(DateTime.Now), "", Starter.lat_gps, Starter.lon_gps, precision, "", "")
|
||||||
|
Starter.enVenta = True
|
||||||
|
End If
|
||||||
|
b_inicioFinVenta.Visible = False
|
||||||
|
End Sub
|
||||||
@@ -269,9 +269,9 @@ 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("XXXXXXXXXXXXXXXXXXXXXXXXX REVISAMOS PERMISOS DE BT - APPEAR -")
|
' Log("XXXXXXXXXXXXXXXXXXXXXXXXX REVISAMOS PERMISOS DE BT - APPEAR -")
|
||||||
StartBluetooth
|
StartBluetooth
|
||||||
Log("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
|
' Log("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
|
||||||
If Not(kh.CheckNotificationAccess) Then
|
If Not(kh.CheckNotificationAccess) Then
|
||||||
Msgbox2Async($"Se necesita acceso a las notificaciones, haga clic en "Aceptar" y en la siguiente pantalla permita el acceso a la aplicación "${Application.LabelName}"."$, "Permisos necesarios", "Aceptar", "", "", Null, True)
|
Msgbox2Async($"Se necesita acceso a las notificaciones, haga clic en "Aceptar" y en la siguiente pantalla permita el acceso a la aplicación "${Application.LabelName}"."$, "Permisos necesarios", "Aceptar", "", "", Null, True)
|
||||||
Wait For Msgbox_Result (resultado As Int)
|
Wait For Msgbox_Result (resultado As Int)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Sub Class_Globals
|
|||||||
Private VERSION As Float = 0.9
|
Private VERSION As Float = 0.9
|
||||||
Private tempArray(1) As Object
|
Private tempArray(1) As Object
|
||||||
Dim jobTagAnterior As String = "" 'Mod por CHV - 211109
|
Dim jobTagAnterior As String = "" 'Mod por CHV - 211109
|
||||||
|
Dim reqsList As List
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Target - The module that handles JobDone (usually Me).
|
'Target - The module that handles JobDone (usually Me).
|
||||||
@@ -23,6 +24,7 @@ End Sub
|
|||||||
Public Sub Initialize (Target As Object, ConnectorLink As String)
|
Public Sub Initialize (Target As Object, ConnectorLink As String)
|
||||||
mTarget = Target
|
mTarget = Target
|
||||||
link = ConnectorLink
|
link = ConnectorLink
|
||||||
|
reqsList.Initialize
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Sends a query request.
|
'Sends a query request.
|
||||||
|
|||||||
Binary file not shown.
@@ -176,7 +176,7 @@ Version=12.5
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Kelloggs Venta
|
#ApplicationLabel: Kelloggs Venta
|
||||||
#VersionCode: 3000
|
#VersionCode: 3000
|
||||||
#VersionName: 3.10.11 PRUEBA V4
|
#VersionName: 3.10.18 PRUEBA V4
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
#BridgeLogger:true
|
#BridgeLogger:true
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ ModuleBreakpoints9=
|
|||||||
ModuleClosedNodes0=
|
ModuleClosedNodes0=
|
||||||
ModuleClosedNodes1=
|
ModuleClosedNodes1=
|
||||||
ModuleClosedNodes10=
|
ModuleClosedNodes10=
|
||||||
ModuleClosedNodes11=1
|
ModuleClosedNodes11=
|
||||||
ModuleClosedNodes12=1
|
ModuleClosedNodes12=1
|
||||||
ModuleClosedNodes13=
|
ModuleClosedNodes13=
|
||||||
ModuleClosedNodes14=
|
ModuleClosedNodes14=
|
||||||
@@ -85,7 +85,7 @@ ModuleClosedNodes26=
|
|||||||
ModuleClosedNodes27=
|
ModuleClosedNodes27=
|
||||||
ModuleClosedNodes28=
|
ModuleClosedNodes28=
|
||||||
ModuleClosedNodes29=
|
ModuleClosedNodes29=
|
||||||
ModuleClosedNodes3=1
|
ModuleClosedNodes3=24
|
||||||
ModuleClosedNodes30=
|
ModuleClosedNodes30=
|
||||||
ModuleClosedNodes31=
|
ModuleClosedNodes31=
|
||||||
ModuleClosedNodes4=
|
ModuleClosedNodes4=
|
||||||
@@ -94,6 +94,6 @@ ModuleClosedNodes6=
|
|||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=C_Principal,Class_Globals,0,0,kms_helperSubs,RD_Init,50,0,kms_helperSubs,agregaColumna,286,3,kms_helperSubs,RD_vacuum,272,0,B4XMainPage,B4XPage_Created,171,6,B4XMainPage,ImageView4_Click,581,0,B4XMainPage,B4XPage_Appear,334,0,Visual Designer,login.bal,-100,3,B4XMainPage,Class_Globals,25,0,B4XMainPage,Entrar_Click,400,0,C_Principal,B4XPage_Created,205,0
|
NavigationStack=Visual Designer,login.bal,-100,1,Visual Designer,principal.bal,-100,1,C_Cliente,B_E_NEXT_Click,3442,0,C_Cliente,Class_Globals,245,0,C_Cliente,B4XPage_Appear,624,6,C_Principal,Class_Globals,0,0,Visual Designer,cliente.bal,-100,3,C_Cliente,Bt_GuardarBoleta_Click,3421,5,C_Cliente,B_CERRAR_I_Click,3417,0,C_Cliente,B_Regresar_Click,2707,0,C_Cliente,B4XPage_CloseRequest,740,0
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=1,29,11,23,30,14
|
VisibleModules=1,29,11,23,30,14,3,18
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ Sub Process_Globals
|
|||||||
Dim boleta As String = 0
|
Dim boleta As String = 0
|
||||||
Dim sesion As Map
|
Dim sesion As Map
|
||||||
' dim cp_running as Boolean = false
|
' dim cp_running as Boolean = false
|
||||||
|
Dim enVenta As Boolean = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub Service_Create
|
Sub Service_Create
|
||||||
|
|||||||
@@ -647,6 +647,7 @@ End Sub
|
|||||||
|
|
||||||
'Marca un cliente como impreso, lo agrega a la tabla "CLIENTE_IMPRESO" y lo actualiza en "kmt_info" (IMPRESION).
|
'Marca un cliente como impreso, lo agrega a la tabla "CLIENTE_IMPRESO" y lo actualiza en "kmt_info" (IMPRESION).
|
||||||
Sub ponImpreso (cliente As String)
|
Sub ponImpreso (cliente As String)
|
||||||
|
LogColor("PON IMPRESO", Colors.red)
|
||||||
Starter.skmt.ExecNonQuery2("UPDATE kmt_info set IMPRESION = 1 where CAT_CL_CODIGO = ?", Array As String(cliente))
|
Starter.skmt.ExecNonQuery2("UPDATE kmt_info set IMPRESION = 1 where CAT_CL_CODIGO = ?", Array As String(cliente))
|
||||||
Starter.skmt.ExecNonQuery2("insert into CLIENTE_IMPRESO (CI_CUENTA) values (?)",Array As String(cliente))
|
Starter.skmt.ExecNonQuery2("insert into CLIENTE_IMPRESO (CI_CUENTA) values (?)",Array As String(cliente))
|
||||||
If Starter.logger Then Log($"Cliente ${cliente} agegado a CLIENTE_IMPRESO y actualizado en kmt_info."$)
|
If Starter.logger Then Log($"Cliente ${cliente} agegado a CLIENTE_IMPRESO y actualizado en kmt_info."$)
|
||||||
@@ -726,7 +727,7 @@ Sub traeCoordsDeBD As List
|
|||||||
Return coords
|
Return coords
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Modifica el ancho y alto de un panel dado con el ancho y alto proporcionados.
|
'Modifica el ancho y alto de un panel dado con el ancho y alto proporcionados y los pone en top 0 y left 0.
|
||||||
Sub panelAnchoAlto(p As Panel, w As Int, h As Int)
|
Sub panelAnchoAlto(p As Panel, w As Int, h As Int)
|
||||||
' If Starter.logger Then Log($"panel:${p}, alncho=${w}, alto=${h}"$)
|
' If Starter.logger Then Log($"panel:${p}, alncho=${w}, alto=${h}"$)
|
||||||
p.Top = 0
|
p.Top = 0
|
||||||
@@ -1548,7 +1549,7 @@ End Sub
|
|||||||
'En geocerca si mete la contraseña poner 0 en precision gps y si esta dentro de los 50 mts poner 1 y 2 para eventos que no lo ocupen
|
'En geocerca si mete la contraseña poner 0 en precision gps y si esta dentro de los 50 mts poner 1 y 2 para eventos que no lo ocupen
|
||||||
'Mandar fecha de sync(sysdate)
|
'Mandar fecha de sync(sysdate)
|
||||||
Sub bitacora(usuariob As String, almacenb As String, rutab As String, eventob As String, clienteb As String, iniciob As String, finb As String, latitudb As String, longitudb As String, precision As String, motivonoventa As String, motivonovisita As String )
|
Sub bitacora(usuariob As String, almacenb As String, rutab As String, eventob As String, clienteb As String, iniciob As String, finb As String, latitudb As String, longitudb As String, precision As String, motivonoventa As String, motivonovisita As String )
|
||||||
|
Log("bitacora")
|
||||||
Starter.skmt.ExecNonQuery($"INSERT INTO BITACORAGPS (usuariob , almacenb , rutab , eventob , clienteb , iniciob , finb , latitudb , longitudb , precision , motivonoventa , motivonovisita) VALUES ('${usuariob}' , '${almacenb}' , '${rutab}' , '${eventob}' , '${clienteb}' , '${iniciob}' , '${finb}' , '${latitudb}' , '${longitudb}' , '${precision}' , '${motivonoventa}' , '${motivonovisita}')"$)
|
Starter.skmt.ExecNonQuery($"INSERT INTO BITACORAGPS (usuariob , almacenb , rutab , eventob , clienteb , iniciob , finb , latitudb , longitudb , precision , motivonoventa , motivonovisita) VALUES ('${usuariob}' , '${almacenb}' , '${rutab}' , '${eventob}' , '${clienteb}' , '${iniciob}' , '${finb}' , '${latitudb}' , '${longitudb}' , '${precision}' , '${motivonoventa}' , '${motivonovisita}')"$)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Reference in New Issue
Block a user