- VERSION 5.09.10

- Se escondio el boton de NoVenta en cliente hata tener ubicacion.
- Se habilitó los clientes nuevos POR RUTA, en la tabla "CLIENTES_NUEVOS_X_RUTA", y si ya llegaron a limite, se "deshabilita" el boton en principal.
- Se corrige que para Trade Spending, estaba todavia la ruta y almacen en duro.
This commit is contained in:
2025-09-17 18:51:37 -06:00
parent d54ebd7994
commit ae8ac63b1d
9 changed files with 369 additions and 76 deletions

View File

@@ -51,6 +51,7 @@ End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub B4XPage_Appear
b_guardar.Visible = False
b_guardar.Enabled = False
permitirCtesNuevos = True
b_guardar.Text = "Sin Ubicación ..."
@@ -61,22 +62,24 @@ Sub B4XPage_Appear
c.Position = 0
maxClientesNuevos = c.GetString("CAT_VA_VALOR")
End If
' Log("MaxClientesNuevos: " & maxClientesNuevos)
Log("MaxClientesNuevos: " & maxClientesNuevos)
'Para el almacen 12 (GDL) no hay limite de clientes nuevos.
If kh.traeAlmacen = 12 Then maxClientesNuevos = 0
' If kh.traeAlmacen = 12 Then maxClientesNuevos = 0
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")}"$)
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
Else
b_guardar.Visible = True
End If
End Sub
@@ -87,6 +90,7 @@ Sub GPS_LocationChanged (Location1 As Location)
b_guardar.Enabled = False
Else
b_guardar.Enabled = True
b_guardar.Visible = True
End If
b_guardar.Text = "Guardar"
End Sub
@@ -128,7 +132,7 @@ Sub b_guardar_Click
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(no_cliente))
Subs.iniciaActividad("cliente")
Else
ToastMessageShow("No hay clientes para visitar el día de hoy.", true)
ToastMessageShow("No hay clientes para visitar el día de hoy.", True)
End If
End If
End Sub