mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 03:49:14 +00:00
20/11/23 - Cambios en defailt para clientes nuevos y algunos estilos
This commit is contained in:
@@ -27,6 +27,8 @@ Sub Class_Globals
|
||||
Private b_cancelar As Button
|
||||
Private Panel1 As Panel
|
||||
Private p_botones As Panel
|
||||
Private maxClientesNuevos As Int = 0
|
||||
Private permitirCtesNuevos As Boolean
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -48,15 +50,38 @@ End Sub
|
||||
|
||||
Sub B4XPage_Appear
|
||||
b_guardar.Enabled = False
|
||||
permitirCtesNuevos = True
|
||||
b_guardar.Text = "Sin Ubicación ..."
|
||||
E_NOMBRE.Text = ""
|
||||
CallSubDelayed(Tracker, "StartFLPSmall")
|
||||
Private c As Cursor = Starter.skmt.ExecQuery($"select CAT_VA_VALOR from cat_variables where CAT_VA_DESCRIPCION = 'MAXCTESNUEVOS'"$)
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
maxClientesNuevos = c.GetString("CAT_VA_VALOR")
|
||||
End If
|
||||
' Log("MaxClientesNuevos: " & maxClientesNuevos)
|
||||
If maxClientesNuevos <> 0 Then
|
||||
Private d As Cursor = Starter.skmt.ExecQuery($"select count(CAT_CL_CODIGO) as ctesNuevos from kmt_info where CAT_CL_CODIGO like 'N%'"$)
|
||||
If d.RowCount > 0 Then
|
||||
d.Position = 0
|
||||
' Log($"Clientes nuevos actuales: ${d.GetString("ctesNuevos")}"$)
|
||||
If d.GetString("ctesNuevos") >= maxClientesNuevos Then
|
||||
b_guardar.Enabled = False
|
||||
permitirCtesNuevos = False
|
||||
ToastMessageShow("¡Ha alcanzado el LIMITE de usuarios nuevos por día!", True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
' lat_gps=Location1.ConvertToSeconds(Location1.Latitude)
|
||||
' lon_gps=Location1.ConvertToSeconds(Location1.Longitude)
|
||||
b_guardar.Enabled = True
|
||||
If Not(permitirCtesNuevos) Then
|
||||
b_guardar.Enabled = False
|
||||
Else
|
||||
b_guardar.Enabled = True
|
||||
End If
|
||||
b_guardar.Text = "Guardar"
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user