- VERSOIN 5.11.26

- Se agregó le descripcion del "flujo" de las promociones en C_Promos
This commit is contained in:
2025-11-30 02:32:36 -06:00
parent 749cf6e7fe
commit 7a88acaf4c
13 changed files with 442 additions and 88 deletions

View File

@@ -11,6 +11,7 @@ Sub Class_Globals
Dim g As GPS
Dim kh As kms_helperSubs
Dim reqManager As DBRequestManager
Dim cmd As DBCommand
Dim ruta As String
Dim clie_id As String
Dim sDate,sTime As String
@@ -48,6 +49,8 @@ Sub Class_Globals
Dim C1 As Cursor
Dim C3 As Cursor
Dim C4, C5, C6, C8 As Cursor
Dim c2 As Cursor
Dim S2 As Cursor
Dim RMI As String
Dim ListView1 As ListView
Dim la_cuenta As Label
@@ -79,9 +82,6 @@ Sub Class_Globals
Dim Guardar As Button
' Dim NUEVO As Button
Dim l_total As Label
Dim c2 As Cursor
Dim S2 As Cursor
Private s As Cursor
Dim res As String
Private HIST As Button
Private MONTO_COMPRA As String
@@ -295,6 +295,11 @@ Sub Class_Globals
Private e_comm As EditText
Private p_infoGral2 As Panel
Dim indicePregunta As Int
Private p_transparenciaNoti As Panel
Private p_Notificacion As Panel
Private l_notificacionTexto As Label
Private l_notificacionTitulo As Label
Private b_notificacion As Button
End Sub
'You can add more parameters here.
@@ -375,6 +380,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
Else
RutaBoleta=Starter.rutaV
End If
If s.IsInitialized Then s.Close
End If
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
c.Position = 0
@@ -390,7 +396,6 @@ Private Sub B4XPage_Created (Root1 As B4XView)
c.Close
Panel_INV_A.Left = 0 : Panel_INV_A.top = 0
Panel10.Left = 0 : Panel10.top = 0
If s.IsInitialized Then s.Close
' Log("################# PERMISOS BT: " & Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
' Log("Permisos BT: " & Starter.rp.Check("android.permission.BLUETOOTH_CONNECT"))
' Log("REVISAMOS PERMISOS DE BT")
@@ -799,6 +804,7 @@ Sub B4XPage_Appear
MsgboxAsync($"Promo por monto "${Subs.traeProdNombre(mPromoXMonto.Get("id"))}" agregada."$,"AVISO")
B4XPage_Appear
End If
dp.Close
End If
End If
Private ppm As Cursor = Starter.skmt.ExecQuery($"select (select ifnull(sum(PE_COSTO_TOT),0) from pedido where CAT_PA_ID <> pe_cedis) as CT, ifnull((select pe_cedis from pedido where pe_cedis = CAT_PA_ID), 0) as existe, * from PROMOS_COMP where CAT_PA_TIPO_PROMONTO = '1' and CT < cast(cat_pa_precio1 as integer)"$) 'Traemos las promos por monto donde la venta es menor al precio1 para borrarlas.
@@ -817,10 +823,28 @@ Sub B4XPage_Appear
B4XPage_Appear
End If
End If
ppm.Close
If Not(Subs.revisaHora) Then
Log("***************** HORA INCORRECTA")
MsgboxAsync("La hora del equipo NO coincide con la hora del servidor, es necesario corregirla", "AVISO IMPORTANTE")
End If
c = Starter.skmt.ExecQuery($"select * from cat_notificaciones where CN_CLIENTE = '${Subs.traeCliente}'"$)
Log("###############################################################")
Log(c.RowCount)
Log("###############################################################")
If c.RowCount > 0 Then
c.Position = 0
l_notificacionTexto.Text = c.GetString("CN_NOTIFICACION")
p_transparenciaNoti.Top = 0 : p_transparenciaNoti.Left = 0
p_transparenciaNoti.Height = Root.Height
p_transparenciaNoti.Width = Root.Width
Subs.centraPanel(p_Notificacion, Root.Width)
p_transparenciaNoti.Visible = True
Log(c.GetString("CN_ID") & "|" & c.GetString("CN_CODIGO"))
b_notificacion.Tag = c.GetString("CN_ID") & "|" & c.GetString("CN_CODIGO")
p_transparenciaNoti.BringToFront
End If
c.Close
End Sub
Sub Printer1_Connected (Success As Boolean)
@@ -896,7 +920,7 @@ Sub GPS_LocationChanged (Location1 As Location)
If c.RowCount > 0 Then
gps_boton_doe = c.GetString("CAT_CL_EMAIL")
End If
c.Close
' gest.Visible = True
' gps_boton_doe ="1"
' LogColor($"Distancia actual: ${distance}"$, Colors.Blue)
@@ -909,6 +933,7 @@ Sub GPS_LocationChanged (Location1 As Location)
clienteConPromo = x.GetString("clienteConPromo")
' Log($"${x.GetString("clienteConPromo")}"$)
End If
x.Close
' If pgs_boton_noventa = "1" Then b_noVenta.Visible = True
' If gps_boton_doe ="1" Then b_whats.Visible = True
@@ -1171,6 +1196,7 @@ Sub B_IMP_Click
C3.Position=0
a_venta = C3.GetString("CANTIDAD")
a_VENTA_F = C3.GetString("TOTAL")
C3.Close
Else
a_venta = 0
a_VENTA_F = 0
@@ -1193,6 +1219,10 @@ Sub B_IMP_Click
Next
End If
s.Close
If S1.IsInitialized Then S1.Close
If S3.IsInitialized Then S3.Close
If S2.IsInitialized Then S2.Close
If C4.IsInitialized Then C4.Close
End Sub
Sub B_IMP2_Click
@@ -1317,6 +1347,7 @@ Sub Imprime_ticket
cr.Position = 0
If cr.GetInt("CREDITO") = 1 Then formaPago = "Crédito"
End If
cr.Close
If la_cuenta.Text = "0" Then
LogColor(123, Colors.red)
Try
@@ -3945,6 +3976,7 @@ Sub revisaPromoEspecial As Map
y.Position = 0
nombreProd = y.GetString("nombreProd")
End If
y.Close
Log("El cliente tiene asignada la promo especial.")
Private p As Cursor
p=Starter.skmt.ExecQuery("select count(*) as hayInventario from CAT_GUNAPROD where CAT_GP_ALMACEN > 0 and CAT_GP_ID = " & x.GetString("CPM_PROID"))
@@ -4419,4 +4451,25 @@ Sub revisaExistenciasDOE As Boolean 'ignore
' 1, "LECHE ALL BRAN NUEZ 236ML", "1008027228"
' 1, "LECHE CHOCO MELVIN 236ML", "1008013799"
Return suficiente
End Sub
Private Sub p_transparenciaNoti_Click
End Sub
Private Sub b_notificacion_Click
Private tag As String = Sender.As(Button).Tag
Log("-" & tag & "-")
Private tag1() As String = Regex.Split("\|", tag)
Log(tag1.Length & "-" & tag1(0) & "-" & tag1(1))
Private CODIGO As String = tag1(0)
Private ID As String = tag1(1)
p_transparenciaNoti.Visible = False
DateTime.DateFormat = "yyyy-MM-dd HH:mm:ss"
Starter.skmt.ExecNonQuery($"insert into HIST_NOTIFICACIONES (HN_CODIGO, HN_ID, HN_FECHA) values ('${CODIGO}', '${ID}', '${DateTime.Date(DateTime.Now)}')"$)
Log(123)
cmd.Initialize
cmd.Name = "updateHistNotificacionesMotivo"
cmd.Parameters = Array As Object("", DateTime.Date(DateTime.Now), Subs.traeRuta, usuario, Subs.traeAlmacen, clienteId)
reqManager.ExecuteCommand(cmd , "updateHistNotificacionesMotivo")
End Sub