- VERSION 5.11.25

- Se agregó código para clientes de doble frecuencia y rutas espejo.
- Se agergó código para limite de clientes nuevos.
This commit is contained in:
2025-11-28 13:56:45 -06:00
parent 9b5c409c9f
commit ddf5cfe2aa
5 changed files with 53 additions and 15 deletions

View File

@@ -117,11 +117,9 @@ Version=11.5
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Dim g As GPS
Dim ruta As String
Dim c As Cursor
Dim CANCELA As Button
Dim GUARDA As Button
Dim cuenta As String
@@ -160,6 +158,10 @@ Sub Class_Globals
Private et_telefono As EditText
Private et_cp As EditText
Private Label6 As Label
Dim cuantosNuevos As Int
Private p_transparenteCN As Panel
Private p_clientesNuevos As Panel
Private b_clienteNuevo As Button
End Sub
'You can add more parameters here.
@@ -209,6 +211,8 @@ End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub B4XPage_Appear
p_transparenteCN.Top = 0 : p_transparenteCN.Left = 0
p_transparenteCN.Width = Root.Width : p_transparenteCN.Height = Root.Height
et_direccion.Text = ""
E_NOMBRE.Text = ""
ET_Atiende.Text = ""
@@ -239,7 +243,32 @@ Sub B4XPage_Appear
GUARDA.Visible = True 'Si hay ubicaccion, mostramos el boton de guardar.
l_sinUbicacion.Visible = True
End If
cuantosNuevos = 0
Subs.centraPanel(p_clientesNuevos, Root.Width)
c = Starter.skmt.ExecQuery("select count(cat_cl_codigo) as cuantos from kmt_info where cat_cl_codigo like 'N%'")
If c.RowCount > 0 Then
c.Position = 0
cuantosNuevos = c.GetInt("cuantos")
End If
c.Close
Dim permitidos As Int = 0
c = Starter.skmt.ExecQuery("select ACTIVO from cn")
If c.RowCount > 0 Then
c.Position = 0
permitidos = c.GetInt("ACTIVO")
End If
c.Close
Log($"Permitidos: ${permitidos}, Actuales: ${cuantosNuevos}"$)
Log((permitidos > 0) & "|" & (permitidos > cuantosNuevos))
If permitidos <> 0 Then ' Si permitidos es CERO entonces SIN LIMITE de clientes nuevos.
If permitidos > cuantosNuevos Then
p_transparenteCN.Visible = False
Else
p_transparenteCN.BringToFront
p_transparenteCN.Visible = True
End If
End If
CallSubDelayed(Tracker, "Track")
CallSubDelayed(Tracker, "StartFLPSmall")
If Tracker.FLP.IsInitialized And Tracker.FLP.GetLastKnownLocation.IsInitialized Then 'Si tenemos "UltimaUbicaccionConocida" la usamos.
@@ -574,4 +603,13 @@ Private Sub et_telefono_TextChanged (Old As String, New As String)
End If
End If
End Sub
Private Sub b_clienteNuevo_Click
B4XPages.ShowPage("Principal")
p_transparenteCN.Visible = False
End Sub
Private Sub p_transparenteCN_Click
End Sub