mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
8/12/23 - Cambios a poductos para que solo paarezca el mensaje del limite abordo cuando el cliete sea CERO
This commit is contained in:
@@ -293,6 +293,7 @@ Sub Class_Globals
|
||||
Private r_4 As RadioButton
|
||||
Private R_5 As RadioButton
|
||||
Private e_comm As EditText
|
||||
Private p_infoGral2 As Panel
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -310,11 +311,10 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
'load the layout to Root
|
||||
Root.LoadLayout("cliente")
|
||||
ruta = File.DirInternal
|
||||
' Subs.panelAnchoAlto(P_INF_GENERAL, Root.Width, Root.Height)
|
||||
' Subs.centraPanel(P_INF_GENERAL, Root.Width)
|
||||
Panel6.Width = Root.Width
|
||||
p_promowhats.Width = Root.Width
|
||||
p_promowhats.visible = False
|
||||
kh.centraPanel(p_infoGral2, Root.Width)
|
||||
If Starter.boleta = 0 Then
|
||||
c=Starter.skmt.ExecQuery("select CAT_CL_CODIGO, CAT_CL_RUTA, CAT_CL_NOMBRE, CAT_CL_ATIENDE1, CAT_CL_ATIENTE2,"& _
|
||||
"CAT_CL_TELEFONO, CAT_CL_EMAIL, CAT_CL_CALLE, CAT_CL_NOEXT, CAT_CL_NOINT, CAT_CL_CALLE1, CAT_CL_CALLE2, "& _
|
||||
@@ -398,7 +398,7 @@ End Sub
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
clienteId = kh.traeCliente(Starter.skmt)
|
||||
clienteId = kh.traeCliente
|
||||
P_DOE.Visible = False
|
||||
If clienteId.StartsWith("N") Then b_noVenta.Visible = False
|
||||
' Log($"TOTAL VENTA: ${kh.traeTotalCliente}"$)
|
||||
@@ -417,8 +417,6 @@ Sub B4XPage_Appear
|
||||
reqManager.Initialize(Me, Starter.DBReqServer)
|
||||
usarGeocerca = kh.traeUsarGeocerca
|
||||
' Log(Subs.traeUltimaActividadBD)
|
||||
' P_INF_GENERAL.Height = Root.Height
|
||||
' P_INF_GENERAL.Width = Root.Width
|
||||
c = Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
||||
c.Position = 0
|
||||
If c.RowCount > 0 Then
|
||||
@@ -772,14 +770,31 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
Starter.lat_gps = "19.432568527069805"
|
||||
Starter.lon_gps = "-99.13335030112772"
|
||||
End If
|
||||
|
||||
'Revisamos si el cliente es candidato a la promo DOE
|
||||
c=Starter.skmt.ExecQuery("select CAT_CL_EMAIL from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
c.Position = 0
|
||||
If c.RowCount > 0 Then
|
||||
gps_boton_doe = c.GetString("CAT_CL_EMAIL")
|
||||
End If
|
||||
|
||||
' gest.Visible = True
|
||||
' gps_boton_doe ="1"
|
||||
' LogColor($"Distancia actual: ${distance}"$, Colors.Blue)
|
||||
|
||||
'Si no estamos usando la geocerca o ya estanos dentro de la geocerca o el usuario es KMTS1 o es abordo ...
|
||||
If Not(usarGeocerca) Or dentroDeGeocerca Or usuario = "KMTSKLL1" Or la_cuenta.Text = "0" Then
|
||||
Private x As Cursor = Starter.skmt.ExecQuery("select count(HIST_CLIENTE) as clienteConPromo from HIST_PROMO_WHATS where HIST_CLIENTE in (Select CUENTA from cuentaa)")
|
||||
If x.RowCount > 0 Then
|
||||
x.Position = 0
|
||||
clienteConPromo = x.GetString("clienteConPromo")
|
||||
' Log($"${x.GetString("clienteConPromo")}"$)
|
||||
End If
|
||||
' If pgs_boton_noventa = "1" Then b_noVenta.Visible = True
|
||||
' If gps_boton_doe ="1" Then b_whats.Visible = True
|
||||
|
||||
' Log($"${gps_boton_doe}|${clienteConPromo}"$)
|
||||
|
||||
If gps_boton_doe = "1" And clienteConPromo = "0" Then b_whats.Visible = True
|
||||
If Not(clienteDeudor) Then B_VENTA.Visible = True 'Si el cliente no tiene adeudo, habilitamos el boton de venta
|
||||
pedido_doe_muestra
|
||||
@@ -1104,7 +1119,7 @@ Sub B_IMP2_Click
|
||||
'printer.Initialize(cmp20.OutputStream)
|
||||
Printer1.Reset
|
||||
Dim bmp As Bitmap
|
||||
bmp.InitializeResize(File.DirAssets, "kelloggs.png", 376, 129, True) 'ignore
|
||||
bmp.InitializeResize(File.DirAssets, "kellanova_borde.png", 376, 129, True) 'ignore
|
||||
Dim myimage As AnImage = Printer1.ImageToBWIMage(bmp)
|
||||
myimage = Printer1.DitherImage2D(myimage, 128)
|
||||
myimage= Printer1.PackImage(myimage)
|
||||
@@ -1311,9 +1326,10 @@ Sub B_IMP2_Click
|
||||
s.Position = 0
|
||||
Private sTotal2 As Double
|
||||
Log(sTotal2)
|
||||
LogColor(s.GetString("TOTAL"),Colors.Magenta)
|
||||
If s.GetString("TOTAL") <> Null And IsNumber(s.GETSTRING("TOTAL")) Then
|
||||
sTotal2 = s.GetString("TOTAL")
|
||||
sTotal2 = Subs.sumaPedido(Subs.traeCliente)
|
||||
' sTotal2 = Subs.sumaPedido(Subs.traeCliente)
|
||||
Printer1.WriteString( $"Sub Total : $${NumberFormat2(sTotal2, 1, 2, 2, False)}"$ & CRLF)
|
||||
Else
|
||||
sTotal2 = 0
|
||||
|
||||
@@ -147,6 +147,7 @@ Sub Activity_KeyPress (key As Int) As Boolean 'ignore
|
||||
End Sub
|
||||
|
||||
Sub BUSCA_TextChanged (Old As String, New As String)
|
||||
Log($"${Old}|${New}"$)
|
||||
q_buscar = "%" & busca.Text & "%"
|
||||
c2 = Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ?) and CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,"DIA_VISITA"))
|
||||
ListView1.Clear
|
||||
|
||||
@@ -748,7 +748,7 @@ Sub cuentaProds
|
||||
' Log($"LIMITE ABORDO DISPONIBLE: ${NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False)}"$)
|
||||
dispAbordo = NumberFormat2((kh.traeLimiteAbordoWeb - (kh.traeLimiteAbordoXInventario - kh.traeVenta) - kh.traeVentaAbordo), 0, 2, 2, False)
|
||||
l_limiteAbordoDisp.Text = $"Disp Abordo: $${dispAbordo}"$
|
||||
If dispAbordo < 1 Then
|
||||
If dispAbordo < 1 and kh.traeCliente = 0 Then
|
||||
b_continuar.Visible = False
|
||||
b_terminar1.Visible = False
|
||||
l_avisoAbordo.BringToFront
|
||||
@@ -1124,7 +1124,7 @@ Sub Busca_TextChanged (Old As String, New As String)
|
||||
forzarBusqueda = False
|
||||
If lfila.text = "PROMOCIONES" Then
|
||||
If Not(lv_promos.Visible) Then lv_promos.Visible = True
|
||||
Private cPromo As Cursor=Starter.skmt.ExecQuery($"select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO, CAT_GP_ALMACEN, CAT_GP_IMG from ${query} where CAT_GP_NOMBRE like '%${New}%' and CAT_GP_ALMACEN > 0 AND CAT_GP_TIPO = 'PROMOS' AND CAT_GP_SUBTIPO = 'PROMOS' AND CAT_GP_TIPOPROD <> 1 and (length(CAT_GP_CODPROMO) = 1 OR CAT_GP_CODPROMO = CAT_GP_ID)"$)
|
||||
Private cPromo As Cursor=Starter.skmt.ExecQuery($"select CAT_GP_ID, CAT_GP_NOMBRE, CAT_GP_PRECIO, CAT_GP_ALMACEN, CAT_GP_IMG from ${query} where CAT_GP_NOMBRE like '%${New}%' and CAT_GP_ALMACEN > 0 AND CAT_GP_TIPO = 'PROMOS' AND CAT_GP_SUBTIPO = 'PROMOS' AND CAT_GP_TIPOPROD <> 1 and (length(CAT_GP_CODPROMO) = 1 OR CAT_GP_CODPROMO = CAT_GP_ID)"$)
|
||||
Log($"res:${cPromo.RowCount}"$)
|
||||
If cPromo.RowCount > 0 Then
|
||||
lv_promos.Clear
|
||||
|
||||
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.12.05 PRUEBA V4
|
||||
#VersionName: 3.12.08 P-V4
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
#BridgeLogger:true
|
||||
|
||||
@@ -83,7 +83,7 @@ ModuleClosedNodes26=2
|
||||
ModuleClosedNodes27=
|
||||
ModuleClosedNodes28=9,10,11
|
||||
ModuleClosedNodes29=
|
||||
ModuleClosedNodes3=24,86,100
|
||||
ModuleClosedNodes3=86
|
||||
ModuleClosedNodes30=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=
|
||||
@@ -91,6 +91,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=3,11,12,14
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Productos,b_prodMas_Click,611,0,C_Productos,cuentaProds,754,0,C_Cliente,B4XPage_Appear,591,0,C_Nota,B4XPage_Created,89,0,C_Nota,B4XPage_Appear,146,0,Subs,borraPedidoClienteActual,1406,6,Visual Designer,cliente.bal,-100,4,C_Cliente,JobDone,3895,0,C_Cliente,b_geopass_Click,3853,2,C_Cliente,b_rechazapromo_Click,3849,0,C_Cliente,b_aceptarrpomo_Click,3842,0
|
||||
NavigationStack=Visual Designer,principal.bal,-100,6,C_Cliente,B4XPage_Created,304,4,C_Cliente,Initialize,298,0,Visual Designer,cliente.bal,-100,6,Visual Designer,productos.bal,-100,1,C_Principal,e_ruta_EnterPressed,2045,0,kms_helperSubs,traeCliente,615,0,kms_helperSubs,hayPedido,696,0,C_Cliente,B4XPage_Appear,394,0,C_Productos,cuentaProds,744,5
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,28,11,24,3,12,7,29
|
||||
VisibleModules=1,28,11,24,3,12,7,4,29
|
||||
|
||||
@@ -616,10 +616,10 @@ Sub traeRuta(db As SQL) As String 'ignore
|
||||
End Sub
|
||||
|
||||
'Regresa el cliente actual de la base de dtos (CUENTAA).
|
||||
Sub traeCliente(db As SQL) As String 'ignore
|
||||
Sub traeCliente As String 'ignore
|
||||
Private c As Cursor
|
||||
Private cl As String
|
||||
c = db.ExecQuery("Select CUENTA from cuentaa")
|
||||
c = khdb.ExecQuery("Select CUENTA from cuentaa")
|
||||
c.Position=0
|
||||
cl = c.GetString("CUENTA")
|
||||
c.Close
|
||||
@@ -700,7 +700,7 @@ End Sub
|
||||
|
||||
'Regresa verdadero si hay pedido en la tabla "PEDIDO" del cliente actual.
|
||||
Sub hayPedido(db As SQL) As Boolean 'ignore
|
||||
Private thisC As Cursor = skmt.ExecQuery($"select count(PE_CLIENTE) as hayPedido from PEDIDO where PE_CLIENTE = '${traeCliente(db)}'"$)
|
||||
Private thisC As Cursor = skmt.ExecQuery($"select count(PE_CLIENTE) as hayPedido from PEDIDO where PE_CLIENTE = '${traeCliente}'"$)
|
||||
thisC.Position = 0
|
||||
Private hay As Boolean = False
|
||||
If thisC.GetInt("hayPedido") > 0 Then hay = True
|
||||
|
||||
Reference in New Issue
Block a user