mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
20/11/23 - Cambios en defailt para clientes nuevos y algunos estilos
This commit is contained in:
@@ -544,7 +544,10 @@ Private Sub B4XPage_CloseRequest As ResumableSub
|
||||
' BACK key pressed
|
||||
'Return True to close, False to cancel
|
||||
Log("BACK")
|
||||
If Panel1.Visible Then
|
||||
If p_extras.Visible Then
|
||||
p_extras.Visible = False
|
||||
Return False
|
||||
else If Panel1.Visible Then
|
||||
Panel1.Visible = False
|
||||
Entrar.Visible = True
|
||||
p_extras.Visible = False
|
||||
@@ -816,7 +819,7 @@ Private Sub et_geocerca_TextChanged (Old As String, New As String)
|
||||
End Sub
|
||||
|
||||
Private Sub b_extras_Click
|
||||
p_extras.Top = p_botones.Top
|
||||
p_extras.Top = E_SERVER.Top
|
||||
kh.centraPanel(p_extras, Root.Width)
|
||||
p_extras.Elevation = 100dip
|
||||
p_extras.BringToFront
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -2356,7 +2356,7 @@ Sub Resumen_Click
|
||||
c = Starter.skmt.ExecQuery("select sum(pc_monto) as MONTO_DIA, count(pc_cliente) AS CLIENTES_DIA from pedido_cliente where pc_cliente <> 0")
|
||||
b = Starter.skmt.ExecQuery("select count(*) as CUANTOS from noventa")
|
||||
'where pc_fecha = ?", Array As String(fecha)
|
||||
C.Position = 0
|
||||
c.Position = 0
|
||||
b.Position = 0
|
||||
L_MONTOD.Text = c.GetString("MONTO_DIA")
|
||||
L_MONTOD.Text = Subs.sumaPedido(Subs.traeCliente) 'Trae el monto sin el redondeo que a veces hace el SUM().
|
||||
@@ -2364,11 +2364,12 @@ Sub Resumen_Click
|
||||
Subs.sumaPedido(Subs.traeCliente)
|
||||
l_cuantosc.Text = c.GetString("CLIENTES_DIA")
|
||||
l_cuantosn.Text = b.GetString("CUANTOS")
|
||||
efectiva = c.GetString("CLIENTES_DIA") / e.GetString("POR_VISITAR")
|
||||
L_CUANTOST.Text = NumberFormat2((l_cuantosc.Text + l_cuantosn.Text), 1, 0, 0, False)
|
||||
efectiva = L_CUANTOST.Text / e.GetString("POR_VISITAR")
|
||||
LogColor($"${L_CUANTOST.Text} / ${e.GetString("POR_VISITAR")} = ${(L_CUANTOST.Text / e.GetString("POR_VISITAR") * 100)}"$, Colors.BLUE)
|
||||
l_efectiva.text = Round2(efectiva*100,2)
|
||||
l_ctast.Text = d.GetString("TOTAL_VISITAR")
|
||||
'l_porvisitar.Text = e.GetString("POR_VISITAR")
|
||||
L_CUANTOST.Text = l_cuantosc.Text + l_cuantosn.Text
|
||||
drop = (c.GetString("CLIENTES_DIA") + b.GetString("CUANTOS"))/ d.GetString("TOTAL_VISITAR")
|
||||
l_drop.Text = Round(drop * 100)
|
||||
If l_drop.Text + l_efectiva.Text < 100 Then
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -870,7 +870,7 @@ Version=12.5
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Kelloggs Venta
|
||||
#VersionCode: 3000
|
||||
#VersionName: 3.11.11 PRUEBA V4
|
||||
#VersionName: 3.11.19 PRUEBA V4
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
#BridgeLogger:true
|
||||
|
||||
@@ -63,7 +63,7 @@ ModuleBreakpoints9=
|
||||
ModuleClosedNodes0=
|
||||
ModuleClosedNodes1=
|
||||
ModuleClosedNodes10=
|
||||
ModuleClosedNodes11=1,3,50,51,52
|
||||
ModuleClosedNodes11=1,50,51,52
|
||||
ModuleClosedNodes12=1,15,16
|
||||
ModuleClosedNodes13=
|
||||
ModuleClosedNodes14=39,40,41,42,43,44
|
||||
@@ -91,6 +91,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Principal,B4XPage_Created,236,0,C_Nota,Class_Globals,21,0,C_Nota,borra_Click,202,0,Subs,borraPedidoClienteActual,1405,0,C_Principal,Class_Globals,0,0,C_Principal,B4XPage_Appear,288,0,C_Cliente,B4XPage_Created,297,0,C_Cliente,Initialize,287,0,C_Cliente,LBL_REGRESA_Click,2703,0,Subs,procesaPromocion,1175,0
|
||||
NavigationStack=C_NuevoCliente,GPS_LocationChanged,75,4,C_NuevoCliente,Class_Globals,24,6,C_NuevoCliente,B4XPage_Created,41,0,C_NuevoCliente,B4XPage_Appear,50,6,kms_helperSubs,traeUsarCartaPorte,655,0,Visual Designer,nuevocliente.bal,-100,2,kms_helperSubs,traeMaxClientesNuevos,659,0,B4XMainPage,Class_Globals,23,0,Visual Designer,login.bal,-100,6,B4XMainPage,B4XPage_CloseRequest,541,6,B4XMainPage,b_extras_Click,815,1
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,28,11,24,3,29,14,12,7,13
|
||||
VisibleModules=1,28,11,24,3,29,14,12,9
|
||||
|
||||
@@ -658,9 +658,10 @@ Sub traeUsarCartaPorte As Boolean 'ignore
|
||||
Return CP
|
||||
End Sub
|
||||
|
||||
'Regresa los clientes nuevos maximos.
|
||||
'Regresa los clientes nuevos maximos.
|
||||
'Si no está especificado, el default es 2.
|
||||
Sub traeMaxClientesNuevos As Int 'ignore
|
||||
Private CN As Int = 0
|
||||
Private CN As Int = 2
|
||||
Private x As Cursor = Starter.skmt.ExecQuery($"select CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'MAXCTESNUEVOS'"$)
|
||||
If x.RowCount > 0 Then
|
||||
x.Position = 0
|
||||
|
||||
Reference in New Issue
Block a user