mirror of
https://github.com/KeymonSoft/Mariana.git
synced 2026-04-21 06:39:14 +00:00
- VERSION 5.07.24
- Cambios en el código de la geoceca, que no se activaba/desactivaba cuando estaba cerca del almacen.
This commit is contained in:
@@ -150,7 +150,8 @@ Sub Class_Globals
|
||||
Private p_passGeocerca As Panel
|
||||
Private b_passGeocerca As Button
|
||||
Private et_passGeocerca As EditText
|
||||
dim l_geoAlmacen As Label
|
||||
Dim l_geoAlmacen As Label
|
||||
Dim rangoAAlmacen As Int = 50
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -220,6 +221,7 @@ Sub B4XPage_Appear
|
||||
b_venta.Enabled = True
|
||||
b_noVenta.Visible = False 'Boton deshabilitado por default.
|
||||
b_venta.Visible = False 'Boton deshabilitado por default.
|
||||
l_geoAlmacen.text = $"Almacen a: N/A"$
|
||||
' c = Starter.skmt.ExecQuery("SELECT ID FROM VENDIDOS WHERE ID IN (Select cuenta from cuentaa)")
|
||||
' If c.RowCount > 0 Then
|
||||
' b_noVenta.Enabled = False
|
||||
@@ -262,7 +264,6 @@ Sub B4XPage_Appear
|
||||
l_total.Text = "0"
|
||||
Else
|
||||
l_total.Text = s.GetString("TOTAL_CLIE")
|
||||
|
||||
End If
|
||||
total_cliente = s.GetString("TOTAL_CLIE")
|
||||
Private factura As String = 0
|
||||
@@ -301,7 +302,6 @@ Sub B4XPage_Appear
|
||||
Else
|
||||
MONTO_COMPRA = "0"
|
||||
End If
|
||||
|
||||
la_saldotot.Text = MONTO_COMPRA
|
||||
If MONTO_COMPRA <> "0" Then
|
||||
META2 = 1200 - MONTO_COMPRA
|
||||
@@ -347,7 +347,6 @@ Sub B4XPage_Appear
|
||||
' b_noVenta.Visible = True
|
||||
' b_venta.Visible = True
|
||||
' End If
|
||||
|
||||
If Not(Starter.GPS.GPSEnabled) Then
|
||||
ToastMessageShow("Debe Activar el GPS del Equipo.", True)
|
||||
StartActivity(Starter.GPS.LocationSettingsIntent)
|
||||
@@ -355,7 +354,6 @@ Sub B4XPage_Appear
|
||||
Starter.GPS.Start(0, 0)
|
||||
' If Starter.ubicacionActual.Latitude <> 0 Then GPS_LocationChanged(Starter.ubicacionActual)
|
||||
End If
|
||||
|
||||
Log("Tracker LR Init: " & (Tracker.actualLR.IsInitialized))
|
||||
If Not(Tracker.actualLR.IsInitialized) Then
|
||||
Log("INICIAMOS TRACKER")
|
||||
@@ -368,23 +366,20 @@ Sub B4XPage_Appear
|
||||
'' Log($"Tenemos UUC: ${Tracker.FLP.GetLastKnownLocation.Latitude},${Tracker.FLP.GetLastKnownLocation.Longitude}"$)
|
||||
' GPS_LocationChanged(Tracker.FLP.GetLastKnownLocation)
|
||||
' End If
|
||||
|
||||
' Log("DISTANCIA: " & distance)
|
||||
' Log("HAY PEDIDO: " & Subs.hayPedido)
|
||||
' Log("GEOCERCA ACTIVA: " & Subs.geocercaHabilitada)
|
||||
' Log("EN ALMACEN: " & Subs.estamosEnAlmacen(50))
|
||||
If Subs.hayPedido Or distance <= 50 Or Not(Subs.geocercaHabilitada) Or Subs.estamosEnAlmacen(50) Then ' Si estamos dentro de la geocerca, habilitamos los botones de Venta y noVenta
|
||||
b_noVenta.Visible = True
|
||||
b_venta.Visible = True
|
||||
Log("Botones visibles")
|
||||
End If
|
||||
|
||||
' If Subs.hayPedido Or distance <= 50 Or Not(Subs.geocercaHabilitada) Or Subs.estamosEnAlmacen(50) Then ' Si estamos dentro de la geocerca, habilitamos los botones de Venta y noVenta
|
||||
' b_noVenta.Visible = True
|
||||
' b_venta.Visible = True
|
||||
' Log("Botones visibles")
|
||||
' End If
|
||||
'Si el cliente es nuevo, no aparece el boton de venta
|
||||
If la_cuenta.text.SubString2(0,1) = "N" Then
|
||||
' If la_cuenta.text.SubString2(0,1) = "N" Then
|
||||
b_venta.Visible = False
|
||||
b_noVenta.Visible = False
|
||||
End If
|
||||
Subs.estamosEnAlmacen(50)
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
@@ -396,7 +391,7 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
' End If
|
||||
|
||||
Dim l1, l2 As Location
|
||||
l1.Initialize2(B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps)
|
||||
l1.Initialize2(Location1.Latitude, Location1.Longitude)
|
||||
' Log($"Coordenadas de la tienda - lat:${m_lat}, lon:${m_lon}"$)
|
||||
l2.Initialize2(m_lat, m_lon)
|
||||
BT_QR.Enabled = True
|
||||
@@ -414,16 +409,20 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
' b_venta.Visible = True
|
||||
' Log("Botones visibles")
|
||||
' End If
|
||||
' Log("###########################################")
|
||||
' Log("No geocerca: " & Not(Subs.geocercaHabilitada))
|
||||
' Log("estamosEnAlmacen: " & Subs.estamosEnAlmacen(50))
|
||||
' Log("distance: " & distance)
|
||||
' Log("hayPedido: " & Subs.hayPedido)
|
||||
Log("###########################################")
|
||||
Log("No geocerca: " & Not(Subs.geocercaHabilitada))
|
||||
Log("estamosEnAlmacen: " & Subs.estamosEnAlmacen(rangoAAlmacen))
|
||||
Log("distance: " & distance)
|
||||
Log("hayPedido: " & Subs.hayPedido)
|
||||
' Subs.estamosEnAlmacen(ramgoAAlmacen)
|
||||
' Log("ENTRAMOS: " & (Subs.hayPedido Or distance <= 50 Or Not(Subs.geocercaHabilitada) Or Subs.estamosEnAlmacen(50)))
|
||||
If Subs.hayPedido Or distance <= 50 Or Not(Subs.geocercaHabilitada) Or Subs.estamosEnAlmacen(50) Then ' Si estamos dentro de la geocerca, habilitamos los botones de Venta y noVenta
|
||||
If Subs.hayPedido Or distance <= 50 Or Not(Subs.geocercaHabilitada) Or Subs.estamosEnAlmacen(rangoAAlmacen) Then ' Si estamos dentro de la geocerca, habilitamos los botones de Venta y noVenta
|
||||
b_noVenta.Visible = True
|
||||
b_venta.Visible = True
|
||||
' Log("Botones visibles")
|
||||
Else
|
||||
b_noVenta.Visible = False
|
||||
b_venta.Visible = False
|
||||
End If
|
||||
LA_GEO.TextColor = Colors.Blue
|
||||
' b_noVenta.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user