mirror of
https://github.com/KeymonSoft/Kelloggs_V3.git
synced 2026-04-17 21:06:22 +00:00
4/11/23 - Código para que el boton de whatsapp solo aparezca si al cliente no se le ha ofrecido la promo
This commit is contained in:
@@ -430,7 +430,7 @@ Sub B4XPage_Appear
|
||||
s.Position=0
|
||||
S1=Starter.skmt.ExecQuery("select count(*) as CUANTOS FROM PEDIDO WHERE PE_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||
S1.Position=0
|
||||
Log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh "&c.RowCount)
|
||||
' Log("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh "&c.RowCount)
|
||||
cursorprueba = Starter.skmt.ExecQuery2("select PE_COSTO_TOT from pedido where PE_CEDIS <> PE_PROID and pe_cliente in (Select CUENTA from cuentaa) AND PE_CEDIS <> ?", Array As String("DOE"))
|
||||
For i= 0 To cursorprueba.RowCount -1
|
||||
cursorprueba.Position = i
|
||||
@@ -612,7 +612,7 @@ Sub B4XPage_Appear
|
||||
If S1.IsInitialized Then S1.Close
|
||||
If logger Then Log("===================== Traemos EXHIBIDORES " & la_cuenta.Text & " =================" )
|
||||
c=Starter.skmt.ExecQuery2("select * FROM HIST_EXHIBIDORES2 where hist_ex_id_cliente = ?", Array As String (la_cuenta.Text))
|
||||
Log("uuuuuuuuuuuuuuuuuuuuuuuuuuuuu "&c.RowCount)
|
||||
' Log("uuuuuuuuuuuuuuuuuuuuuuuuuuuuu "&c.RowCount)
|
||||
If c.RowCount > 0 Then
|
||||
Private exhibs As String = ""
|
||||
Private separador As String = ""
|
||||
@@ -729,9 +729,18 @@ Sub GPS_LocationChanged (Location1 As Location)
|
||||
gps_boton_doe = c.GetString("CAT_CL_EMAIL")
|
||||
End If
|
||||
' LogColor($"Distancia actual: ${distance}"$, Colors.Blue)
|
||||
' Log(">>>>>>>>>>> " & distance & "|" & gps_boton_doe)
|
||||
If distance <= 50 Or usuario = "KMTSKLL1" Then
|
||||
Private clienteConPromo As Int = 0
|
||||
'Revisamos si el cliente ya existe en HIST_PROMO_WHATS.
|
||||
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")
|
||||
End If
|
||||
' If pgs_boton_noventa = "1" Then Tels.Visible = True
|
||||
If gps_boton_doe ="1" Then b_whats.Visible = True
|
||||
' Log(clienteConPromo)
|
||||
If gps_boton_doe = "1" And clienteConPromo = "0" Then b_whats.Visible = True
|
||||
B_VENTA.Visible = True
|
||||
Tels.Visible = True
|
||||
If l_total.Text <> Null And l_total.Text <> "null" Then
|
||||
|
||||
Reference in New Issue
Block a user