mirror of
https://github.com/KeymonSoft/Guna_Preventa_BAT.git
synced 2026-04-17 21:06:18 +00:00
6.02.19
This commit is contained in:
@@ -42,6 +42,7 @@ Sub Class_Globals
|
||||
Public Tclientes As V_Tclientes
|
||||
|
||||
Public historicobat As C_historicobat
|
||||
Public historicobattodos As C_historicobatyodos
|
||||
|
||||
Dim reqManager As DBRequestManager
|
||||
Dim v As String = Application.VersionName
|
||||
@@ -150,6 +151,9 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
historicobat.Initialize
|
||||
B4XPages.AddPage("historicobat", historicobat)
|
||||
|
||||
historicobattodos.Initialize
|
||||
B4XPages.AddPage("historicobattodos", historicobattodos)
|
||||
|
||||
Clientes_Completos.Initialize
|
||||
B4XPages.AddPage("Clientes_Completos", Clientes_Completos)
|
||||
|
||||
@@ -239,6 +243,9 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
Subs.agregaColumna("PEDIDO", "PE_FUTURO", "TEXT")
|
||||
Subs.agregaColumna("PEDIDO", "PE_RECALCULOTOT", "TEXT")
|
||||
Subs.agregaColumna("HIST_ENCUESTA", "HE_LON", "TEXT")
|
||||
|
||||
Subs.agregaColumna("hist_ventastodos", "HVD_NUM_TICKET", "TEXT")
|
||||
|
||||
Subs.agregaColumna("HIST_VENTAS", "HVD_FECHA", "TEXT")
|
||||
Subs.agregaColumna("kmt_info3", "CAT_CL_NUMEROINT", "TEXT")
|
||||
Subs.agregaColumna("kmt_info3", "CAT_CL_NUMEROEXT", "TEXT")
|
||||
|
||||
@@ -2115,7 +2115,7 @@ Sub gest_Click
|
||||
If resultado = DialogResponse.POSITIVE Then
|
||||
gestionar
|
||||
End If
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 1 Then
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 8 Then
|
||||
MsgboxAsync($"No se puede realizar venta por que presenta ${(DiferenciaDias-(c.GetInt("CAT_CL_DIASCREDITO") +1))} días de atraso en el credito, por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$, "Atención")
|
||||
End If
|
||||
Else
|
||||
@@ -2126,7 +2126,7 @@ Sub gest_Click
|
||||
If resultado = DialogResponse.POSITIVE Then
|
||||
gestionar
|
||||
End If
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 1 Then
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 8 Then
|
||||
MsgboxAsync($"No se puede realizar venta por que presenta ${(DiferenciaDias-(c.GetInt("CAT_CL_DIASCREDITO") +1))} días de atraso en el credito, por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$, "Atención")
|
||||
End If
|
||||
End If
|
||||
@@ -3435,7 +3435,11 @@ Sub Impresion4
|
||||
Printer1.WriteString(BLANCO & s.GETSTRING("PE_CANT") & " X $" & s.GETSTRING("PE_COSTOU") & " $" & s.GETSTRING("PE_COSTO_TOT") & eLINEFEED )
|
||||
|
||||
|
||||
If Subs.traeTipoCliente= 5 Then
|
||||
Dim coloressaldo As Cursor=B4XPages.MainPage.skmt.ExecQuery("select IFNULL(CAT_CL_CLASIFICADOR2,0) AS CAT_CL_CLASIFICADOR2 from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
coloressaldo.Position = 0
|
||||
|
||||
If coloressaldo.GetString("CAT_CL_CLASIFICADOR2") = "LP222_D" Then
|
||||
|
||||
Dim precioprom As Cursor = Starter.skmt.ExecQuery($"SELECT CAT_LISTAPRECIO AS CAT_GP_PRECIO FROM CAT_GUNAPROD WHERE CAT_GP_NOMBRE = '${s.GetString("PE_PRONOMBRE")}' "$)
|
||||
Else
|
||||
Dim precioprom As Cursor = Starter.skmt.ExecQuery($"SELECT CAT_GP_PRECIO FROM CAT_GUNAPROD WHERE CAT_GP_NOMBRE = '${s.GetString("PE_PRONOMBRE")}' "$)
|
||||
@@ -3550,6 +3554,21 @@ Sub Mandap
|
||||
' cuantos_pedido = D.GetString("CUANTOS_PEDIDO")
|
||||
d.Close
|
||||
|
||||
' UPDATE VENTA CREDITO
|
||||
'' UPDATE GUNA.CAT_CLIENTES SET CAT_CL_CTA = (?) WHERE cat_cl_codigo = (?) AND CAT_CL_IDALMACEN = (?) AND CAT_CL_RUTA = (?)
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("Select * from CODIGOS_CREDITO where BANDERA = 1")
|
||||
If c.RowCount>0 Then
|
||||
For i=0 To c.RowCount -1
|
||||
c.Position=i
|
||||
Dim cmd As DBCommand
|
||||
cmd.Initialize
|
||||
cmd.Name = "update_ventacredito_guna"
|
||||
cmd.Parameters = Array As Object(C.GetString("BANDERA"),C.GetString("CLIENTE"),ALMACEN,Subs.traeRuta2(C.GetString("CLIENTE")))
|
||||
B4XPages.MainPage.reqManager.ExecuteCommand(cmd , "up_coordenadas")
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
|
||||
' If ALMACEN = "88" Or ALMACEN = "6" Then
|
||||
c=B4XPages.MainPage.skmt.ExecQuery2("SELECT PE_RECALCULO,PE_RECALCULOTOT,ifnull(PE_RECCEDIS,'') as PE_RECCEDIS,PE_CEDIS,PE_COSTO_TOT,PE_COSTOU,ifnull(PE_CANT,0) as PE_CANT,PE_PRONOMBRE,PE_PROID,PE_CLIENTE,PE_FECHA,PE_USUARIO, PE_COSTO_SIN, PE_RUTA, PE_DESC, PE_FOLIO, IFNULL(PE_RECCANT,0) AS PE_RECCANT FROM PEDIDO WHERE PE_RECALCULO <> ? or PE_RECALCULO <> ? or PE_RECALCULO IS NOT NULL",Array As String("","null"))
|
||||
d=B4XPages.MainPage.skmt.ExecQuery($"SELECT COUNT(*) as CUANTOS_PEDIDO FROM PEDIDO where PE_RUTA = '${Subs.traeRuta}'"$)
|
||||
@@ -7867,12 +7886,12 @@ Private Sub l_limite_Click
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select IFNULL(CAT_CL_DIASCREDITO,0) AS CAT_CL_DIASCREDITO from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
c.Position = 0
|
||||
|
||||
If DiferenciaDias <= c.GetInt("CAT_CL_DIASCREDITO") + 1 Then
|
||||
If DiferenciaDias <= c.GetInt("CAT_CL_DIASCREDITO") + 8 Then
|
||||
' Msgbox2Async($"Favor de pagar su credito el día de mañana por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$, "Recordatorio", "Ok", "", "", LoadBitmap(File.DirAssets,"alert2.png"), False)
|
||||
|
||||
' l_deuda.Text = ($"Favor de pagar su credito el día de mañana por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$)
|
||||
l_deuda.Text = cs.Color(Colors.Black).Append("Monto de la deuda:" & CRLF&CRLF).Pop.Size(18).Color(Colors.RGB(48,109,0)).Append("$ "& pagarepen.GetString("SALDO_PENDIENTE")).PopAll
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 1 Then
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 8 Then
|
||||
' l_deuda.Text = ($"No se puede realizar venta por que presenta ${(DiferenciaDias-(c.GetInt("CAT_CL_DIASCREDITO") +1))} días de atraso en el credito, por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$)
|
||||
l_deuda.Text = cs.Color(Colors.Black).Append("Monto de la deuda:" & CRLF&CRLF).Pop.Color(Colors.Red).Size(18).Append("$ " &pagarepen.GetString("SALDO_PENDIENTE")&CRLF&CRLF).Pop.Size(14).Color(Colors.Black).Append("Dias de atraso:" & CRLF&CRLF).Pop.Size(18).Color(Colors.Red).Append((DiferenciaDias-(c.GetInt("CAT_CL_DIASCREDITO") +1))).PopAll
|
||||
End If
|
||||
@@ -7921,14 +7940,14 @@ Private Sub b_preventa2_Click
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select IFNULL(CAT_CL_DIASCREDITO,0) AS CAT_CL_DIASCREDITO from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
c.Position = 0
|
||||
|
||||
If DiferenciaDias <= c.GetInt("CAT_CL_DIASCREDITO") + 1 Then
|
||||
If DiferenciaDias <= c.GetInt("CAT_CL_DIASCREDITO") + 8 Then
|
||||
' MsgboxAsync($"Favor de pagar su credito el día de mañana por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$, "Recordatorio")
|
||||
Msgbox2Async($"Favor de pagar su credito el día de mañana por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$, "Recordatorio", "Ok", "", "", LoadBitmap(File.DirAssets,"alert2.png"), False)
|
||||
Wait For Msgbox_Result (resultado As Int)
|
||||
If resultado = DialogResponse.POSITIVE Then
|
||||
gestionar
|
||||
End If
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 1 Then
|
||||
Else If DiferenciaDias > c.GetInt("CAT_CL_DIASCREDITO") + 8 Then
|
||||
MsgboxAsync($"No se puede realizar venta por que presenta ${(DiferenciaDias-(c.GetInt("CAT_CL_DIASCREDITO") +1))} días de atraso en el credito, por un monto de $${pagarepen.GetString("SALDO_PENDIENTE")}"$, "Atención")
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -63,6 +63,7 @@ Sub BUSCA_TextChanged (Old As String, New As String)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Sub ListView1_ItemClick (Position As Int, Value As Object)
|
||||
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
|
||||
@@ -59,7 +59,7 @@ Sub Class_Globals
|
||||
Private BONSABOR2 As String
|
||||
Dim cmd As DBCommand
|
||||
Private p_pedido As Panel
|
||||
Dim tipo_venta As String = Subs.traeTipoVentaDeBD
|
||||
dim tipo_venta as string = Subs.traeTipoVentaDeBD
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
|
||||
@@ -1629,7 +1629,7 @@ Sub JobDone(Job As HttpJob)
|
||||
If n = "OKActivo" Then
|
||||
Dim cmd As DBCommand
|
||||
cmd.Initialize
|
||||
cmd.Name = "select_ruta_GV2_70_14"
|
||||
cmd.Name = "select_ruta_GV2_70_15"
|
||||
cmd.Parameters = Array As Object(ALMACEN,e_ruta.text, usuario)
|
||||
B4XPages.MainPage.reqManager.ExecuteQuery(cmd , 0, "ruta")
|
||||
'Log("Usuario guardado en BD es 'Valido'")
|
||||
@@ -1723,7 +1723,7 @@ Sub JobDone(Job As HttpJob)
|
||||
Private fecha As String = records(RESULT.Columns.Get("CAT_CL_FOTO_FECHA"))
|
||||
Private CLIENTE As String = records(RESULT.Columns.Get("CAT_CL_CODIGO"))
|
||||
Private f As Cursor = Starter.skmt.ExecQuery($"select * from fotos where cliente = '${CLIENTE}' and fecha = '${fecha}'"$)
|
||||
Log("==> EXISTE LA FOTO:" & f.RowCount)
|
||||
' Log("==> EXISTE LA FOTO:" & f.RowCount)
|
||||
If f.RowCount = 0 Then
|
||||
cmd.Initialize
|
||||
cmd.Name = "traeFotoGuna"
|
||||
@@ -1800,7 +1800,7 @@ Sub JobDone(Job As HttpJob)
|
||||
If hdsgf.RowCount = 0 Then
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CODIGOS_CREDITO(CODIGO,BANDERA,CLIENTE) VALUES (?,?,?)", Array As Object (CODIGOCREDITO,BANDERACREDITO,CLIENTECREDITO))
|
||||
Else
|
||||
Log("NO ENTRO")
|
||||
' Log("NO ENTRO")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2538,8 +2538,9 @@ Sub JobDone(Job As HttpJob)
|
||||
Dim HVD_CANT As String = records(RESULT.Columns.Get("HVD_CANT"))
|
||||
Dim HVD_COSTO_TOT As String = records(RESULT.Columns.Get("HVD_COSTO_TOT"))
|
||||
Dim HVD_FECHA As String = records(RESULT.Columns.Get("HVD_FECHA"))
|
||||
Log(HVD_CLIENTE&"--"&HVD_PRONOMBRE&"--"&HVD_CANT&"--"&HVD_COSTO_TOT)
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO hist_ventastodos(HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA) VALUES (?,?,?,?,?)", Array As Object (HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT,HVD_FECHA))
|
||||
Dim HVD_NUM_TICKET As String = records(RESULT.Columns.Get("HVD_NUM_TICKET"))
|
||||
' Log(HVD_CLIENTE&"--"&HVD_PRONOMBRE&"--"&HVD_CANT&"--"&HVD_COSTO_TOT)
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO hist_ventastodos(HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT, HVD_FECHA, HVD_NUM_TICKET) VALUES (?,?,?,?,?,?)", Array As Object (HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT,HVD_FECHA, HVD_NUM_TICKET))
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
@@ -1843,7 +1843,10 @@ Sub LlenaProdsLL(p As ResultSet)
|
||||
' End If
|
||||
|
||||
|
||||
If Subs.traeTipoCliente = 5 Then
|
||||
Dim coloressaldo As Cursor=B4XPages.MainPage.skmt.ExecQuery("select IFNULL(CAT_CL_CLASIFICADOR2,0) AS CAT_CL_CLASIFICADOR2 from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
coloressaldo.Position = 0
|
||||
|
||||
If coloressaldo.GetString("CAT_CL_CLASIFICADOR2") = "LP222_D" Then
|
||||
Dim p As ResultSet = B4XPages.MainPage.skmt.ExecQuery($"select distinct CAT_GP_ID, CAT_GP_NOMBRE, CAT_LISTAPRECIO, CAT_LISTAPRECIO, CAT_GP_ALMACEN, CAT_GP_IMG, CAT_GP_TIPOPROD, CAT_GP_INICIATIVA from ${Subs.traeTablaProds(tipo_venta)} where CAT_GP_PRECIO > 0 AND CAT_GP_ALMACEN > 0 and CAT_GP_TIPO <> 'PROMOS' and CAT_GP_TIPO <> 'PROMOCION'
|
||||
order by
|
||||
Case CAT_GP_TIPOPROD when 'PRIORITARIO' THEN 0
|
||||
@@ -1875,17 +1878,20 @@ Sub LlenaProdsLL(p As ResultSet)
|
||||
' Log(p.GetString("CAT_GP_NOMBRE"))
|
||||
' Dim tempMap As Map = CreateMap("prod":p.GetString("CAT_GP_NOMBRE"), "precio":p.GetString("CAT_GP_PRECIO"), "prioridad":p.GetString("CAT_GP_TIPOPROD"), "almacen":p.GetString("CAT_GP_ALMACEN"), "id":p.GetString("CAT_GP_ID"), "cant":cant, "conversion":1, "precio_caja":0, "b_caja":0)
|
||||
' End If
|
||||
'' Log(tempMap)
|
||||
'' Log(tempMap)
|
||||
' listaProds.Add(tempMap)
|
||||
' Loop
|
||||
|
||||
Dim coloressaldo As Cursor=B4XPages.MainPage.skmt.ExecQuery("select IFNULL(CAT_CL_CLASIFICADOR2,0) AS CAT_CL_CLASIFICADOR2 from kmt_info3 where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
coloressaldo.Position = 0
|
||||
|
||||
Do While p.NextRow
|
||||
Private cant As Int = 0
|
||||
If hayPedido And cantsMap.ContainsKey(p.GetString("CAT_GP_ID")) Then
|
||||
Log(p.GetString("CAT_GP_ID"))
|
||||
cant = cantsMap.Get(p.GetString("CAT_GP_ID"))
|
||||
End If
|
||||
If Subs.traeTipoCliente = 5 Then
|
||||
If coloressaldo.GetString("CAT_CL_CLASIFICADOR2") = "LP222_D" Then
|
||||
If p.GetString("CAT_GP_ID") <> "GUN141" And p.GetString("CAT_GP_ID") <> "GUN142" Then
|
||||
' Log(p.GetString("CAT_GP_NOMBRE"))
|
||||
' ¡Importante! Crear un NUEVO mapa en cada iteración.
|
||||
|
||||
163
B4A/C_historicobatyodos.bas
Normal file
163
B4A/C_historicobatyodos.bas
Normal file
@@ -0,0 +1,163 @@
|
||||
B4A=true
|
||||
Group=Default Group
|
||||
ModulesStructureVersion=1
|
||||
Type=Class
|
||||
Version=12.8
|
||||
@EndOfDesignText@
|
||||
Sub Class_Globals
|
||||
Private Root As B4XView 'ignore
|
||||
Private xui As XUI 'ignore
|
||||
|
||||
Dim g As GPS
|
||||
Dim clie_id As String
|
||||
Dim sDate,sTime As String
|
||||
Dim usuario As String
|
||||
|
||||
Dim c As Cursor
|
||||
Dim ruta As String
|
||||
Dim Regresar As Button
|
||||
|
||||
|
||||
Dim ListView1 As ListView
|
||||
Dim L_CANT As Label
|
||||
Dim L_TOTAL As Label
|
||||
Dim borra As Button
|
||||
Dim Existe As String
|
||||
Dim result As String
|
||||
' Dim lat_gps, lon_gps As String
|
||||
|
||||
Private Titulo As Label
|
||||
Private b_desc As Button
|
||||
Private ListView2 As ListView
|
||||
Dim tgl As Toggle
|
||||
Private p_nota As Panel
|
||||
Private Panel1 As Panel
|
||||
Private l_productohist As Label
|
||||
Private l_s1 As Label
|
||||
Private l_s2 As Label
|
||||
Private l_s3 As Label
|
||||
Private l_s4 As Label
|
||||
Private CustomListView1 As CustomListView
|
||||
Private L_PROMEDIOHIST As Label
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
Public Sub Initialize As Object
|
||||
Return Me
|
||||
End Sub
|
||||
|
||||
'This event will be called once, before the page becomes visible.
|
||||
Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
Root = Root1
|
||||
'load the layout to Root
|
||||
Root.LoadLayout("nota3")
|
||||
borra.Visible = False
|
||||
Titulo.Text = "Acumulado"
|
||||
b_desc.Visible = False
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Sub B4XPage_Appear
|
||||
Panel1.Visible = False
|
||||
If Not(Starter.gps.GPSEnabled) Then
|
||||
ToastMessageShow("Es necesario tener el GPS encendido", True)
|
||||
StartActivity(Starter.gps.LocationSettingsIntent)
|
||||
End If
|
||||
|
||||
L_CANT.Text = ""
|
||||
L_TOTAL.Text = ""
|
||||
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select count(*) as EXISTE from hist_ventastodos WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)")
|
||||
c.Position = 0
|
||||
Existe = c.GetString("EXISTE")
|
||||
c.Close
|
||||
|
||||
' =====================================================================
|
||||
' NUEVA LÓGICA DE LISTVIEW1: DISEÑO "TICKET MODERNO"
|
||||
' =====================================================================
|
||||
ListView1.Clear
|
||||
ListView1.Visible = True
|
||||
|
||||
' 1. Fondo de la lista: Un gris muy claro/hueso para simular el papel
|
||||
ListView1.Color = xui.Color_RGB(245, 245, 245)
|
||||
|
||||
' 2. Diseño del Encabezado (El Ticket y la Fecha)
|
||||
ListView1.SingleLineLayout.Label.TextSize = 16
|
||||
' Azul oscuro elegante para separar visualmente los tickets
|
||||
ListView1.SingleLineLayout.Label.TextColor = xui.Color_RGB(25, 118, 210)
|
||||
ListView1.SingleLineLayout.Label.Typeface = Typeface.DEFAULT_BOLD
|
||||
' Centrado en ambas direcciones para que parezca un divisor
|
||||
ListView1.SingleLineLayout.Label.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.CENTER_HORIZONTAL)
|
||||
ListView1.SingleLineLayout.ItemHeight = 50dip
|
||||
|
||||
' 3. Diseño del Detalle (Los Productos)
|
||||
ListView1.TwoLinesLayout.Label.TextSize = 16
|
||||
ListView1.TwoLinesLayout.Label.TextColor = xui.Color_RGB(33, 33, 33) ' Gris casi negro (mejor lectura)
|
||||
ListView1.TwoLinesLayout.Label.Typeface = Typeface.DEFAULT_BOLD
|
||||
ListView1.TwoLinesLayout.Label.Gravity = Gravity.CENTER_VERTICAL
|
||||
|
||||
ListView1.TwoLinesLayout.SecondLabel.TextSize = 15
|
||||
' Verde oscuro para destacar el dinero y la cantidad
|
||||
ListView1.TwoLinesLayout.SecondLabel.TextColor = xui.Color_RGB(56, 142, 60)
|
||||
ListView1.TwoLinesLayout.SecondLabel.Typeface = Typeface.DEFAULT_BOLD
|
||||
ListView1.TwoLinesLayout.ItemHeight = 70dip ' Espacio cómodo para que respire el texto
|
||||
|
||||
' Query: Ordena de más antiguo a más reciente
|
||||
Dim queryVentas As String = $"
|
||||
SELECT HVD_NUM_TICKET, HVD_PRONOMBRE, HVD_CANT, HVD_COSTO_TOT, HVD_FECHA
|
||||
FROM hist_ventastodos
|
||||
WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa)
|
||||
ORDER BY
|
||||
SUBSTR(HVD_FECHA, 7, 4) ASC,
|
||||
SUBSTR(HVD_FECHA, 4, 2) ASC,
|
||||
SUBSTR(HVD_FECHA, 1, 2) ASC,
|
||||
HVD_NUM_TICKET ASC
|
||||
"$
|
||||
|
||||
c = B4XPages.MainPage.skmt.ExecQuery(queryVentas)
|
||||
|
||||
If c.RowCount > 0 Then
|
||||
Dim currentTicket As String = ""
|
||||
|
||||
For i = 0 To c.RowCount - 1
|
||||
c.Position = i
|
||||
|
||||
Dim ticket As String = c.GetString("HVD_NUM_TICKET")
|
||||
Dim fecha As String = c.GetString("HVD_FECHA")
|
||||
Dim producto As String = c.GetString("HVD_PRONOMBRE")
|
||||
Dim cant As String = c.GetString("HVD_CANT")
|
||||
Dim costo As String = c.GetString("HVD_COSTO_TOT")
|
||||
|
||||
' Agregamos el separador de Ticket
|
||||
If ticket <> currentTicket Then
|
||||
ListView1.AddSingleLine($"🎫 TICKET: ${ticket} | 📅 ${fecha}"$)
|
||||
currentTicket = ticket
|
||||
End If
|
||||
|
||||
' Formateamos el texto del detalle usando Smart String Literal para que se vea más profesional
|
||||
Dim detalle As String = $"📦 Cantidad: ${cant} | 💵 Total: $${costo}"$
|
||||
ListView1.AddTwoLines(producto, detalle)
|
||||
Next
|
||||
End If
|
||||
c.Close
|
||||
' =====================================================================
|
||||
|
||||
' Lógica para totales
|
||||
If Existe <> "0" Then
|
||||
c = B4XPages.MainPage.skmt.ExecQuery("select SUM(HVD_CANT) AS PC_NOART, SUM(HVD_COSTO_TOT) AS PC_MONTO from hist_ventastodos where HVD_CLIENTE in (Select CUENTA from cuentaa)")
|
||||
c.Position = 0
|
||||
L_CANT.Text = c.GetString("PC_NOART")
|
||||
L_TOTAL.Text = c.GetString("PC_MONTO")
|
||||
c.Close
|
||||
End If
|
||||
|
||||
' ...
|
||||
' (AQUÍ SIGUE TU CÓDIGO DEL CustomListView1 PARA EL PROMEDIO DE 4 SEMANAS)
|
||||
' CustomListView1.AsView.Height = Root.Height * 0.45
|
||||
' ...
|
||||
End Sub
|
||||
|
||||
|
||||
BIN
B4A/Files/nota3.bal
Normal file
BIN
B4A/Files/nota3.bal
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,21 +1,22 @@
|
||||
Build1=Default,gunav2.keymon.com.mx
|
||||
File1=alert2.png
|
||||
File10=clientes.bal
|
||||
File100=salma.jpg
|
||||
File101=salma.png
|
||||
File102=seleccion.bal
|
||||
File103=senial.jpg
|
||||
File104=sync.png
|
||||
File105=tache_rojo.png
|
||||
File106=telefonos.bal
|
||||
File107=Ticket dia.jpg
|
||||
File108=ticketdia20.png
|
||||
File109=ticketsdia.bal
|
||||
File100=rojo.png
|
||||
File101=salma.jpg
|
||||
File102=salma.png
|
||||
File103=seleccion.bal
|
||||
File104=senial.jpg
|
||||
File105=sync.png
|
||||
File106=tache_rojo.png
|
||||
File107=telefonos.bal
|
||||
File108=Ticket dia.jpg
|
||||
File109=ticketdia20.png
|
||||
File11=Clientes_Completos.bal
|
||||
File110=Tiendita.jpg
|
||||
File111=usuario.png
|
||||
File112=verde.png
|
||||
File113=Vista_todoslosclientes.bal
|
||||
File110=ticketsdia.bal
|
||||
File111=Tiendita.jpg
|
||||
File112=usuario.png
|
||||
File113=verde.png
|
||||
File114=Vista_todoslosclientes.bal
|
||||
File12=comis.bal
|
||||
File13=contrasena.png
|
||||
File14=datoscliente.bal
|
||||
@@ -85,33 +86,33 @@ File71=menos-red.png
|
||||
File72=nota (conflict 2022-07-08-00-16-40).bal
|
||||
File73=nota.bal
|
||||
File74=nota2.bal
|
||||
File75=noventa.bal
|
||||
File76=nuevocliente.bal
|
||||
File77=nuevo-cliente20.png
|
||||
File78=Nvo Cliente.jpg
|
||||
File79=p&g.png
|
||||
File75=nota3.bal
|
||||
File76=noventa.bal
|
||||
File77=nuevocliente.bal
|
||||
File78=nuevo-cliente20.png
|
||||
File79=Nvo Cliente.jpg
|
||||
File8=celltitle.bal
|
||||
File80=palomita_verde.png
|
||||
File81=Panel_Nuevocliente.bal
|
||||
File82=pedido.bal
|
||||
File83=planfia_logo.png
|
||||
File84=planfia_logo_old.png
|
||||
File85=planfia_logo_old2.png
|
||||
File86=principal.bal
|
||||
File87=proditem.bal
|
||||
File88=proditem1.bal
|
||||
File89=proditem2.bal
|
||||
File80=p&g.png
|
||||
File81=palomita_verde.png
|
||||
File82=Panel_Nuevocliente.bal
|
||||
File83=pedido.bal
|
||||
File84=planfia_logo.png
|
||||
File85=planfia_logo_old.png
|
||||
File86=planfia_logo_old2.png
|
||||
File87=principal.bal
|
||||
File88=proditem.bal
|
||||
File89=proditem1.bal
|
||||
File9=cliente.bal
|
||||
File90=productos.bal
|
||||
File91=productos_.bal
|
||||
File92=promociones.bal
|
||||
File93=qr.bal
|
||||
File94=qr_gallina.jpg
|
||||
File95=QRPlanLealtad.png
|
||||
File96=resdia.bal
|
||||
File97=ResDia.jpg
|
||||
File98=resdia20.png
|
||||
File99=rojo.png
|
||||
File90=proditem2.bal
|
||||
File91=productos.bal
|
||||
File92=productos_.bal
|
||||
File93=promociones.bal
|
||||
File94=qr.bal
|
||||
File95=qr_gallina.jpg
|
||||
File96=QRPlanLealtad.png
|
||||
File97=resdia.bal
|
||||
File98=ResDia.jpg
|
||||
File99=resdia20.png
|
||||
FileGroup1=Default Group
|
||||
FileGroup10=Default Group
|
||||
FileGroup100=Default Group
|
||||
@@ -129,6 +130,7 @@ FileGroup110=Default Group
|
||||
FileGroup111=Default Group
|
||||
FileGroup112=Default Group
|
||||
FileGroup113=Default Group
|
||||
FileGroup114=Default Group
|
||||
FileGroup12=Default Group
|
||||
FileGroup13=Default Group
|
||||
FileGroup14=Default Group
|
||||
@@ -266,43 +268,44 @@ ManifestCode='This code will be applied to the manifest file during compilation.
|
||||
Module1=appUpdater
|
||||
Module10=C_Historico2
|
||||
Module11=C_historicobat
|
||||
Module12=C_Mapas
|
||||
Module13=C_Nota
|
||||
Module14=C_NoVenta
|
||||
Module15=C_NuevoCliente
|
||||
Module16=C_Pedidos
|
||||
Module17=C_Principal
|
||||
Module18=C_Productos
|
||||
Module19=C_Promos
|
||||
Module12=C_historicobatyodos
|
||||
Module13=C_Mapas
|
||||
Module14=C_Nota
|
||||
Module15=C_NoVenta
|
||||
Module16=C_NuevoCliente
|
||||
Module17=C_Pedidos
|
||||
Module18=C_Principal
|
||||
Module19=C_Productos
|
||||
Module2=B4XMainPage
|
||||
Module20=C_TicketsDia
|
||||
Module21=C_UpdateAvailable
|
||||
Module22=CameraExClass
|
||||
Module23=cPDF
|
||||
Module24=DBRequestManager
|
||||
Module25=EscPosPrinter
|
||||
Module26=FirebaseMessaging
|
||||
Module27=MAPA_RUTAS
|
||||
Module28=Starter
|
||||
Module29=Subs
|
||||
Module20=C_Promos
|
||||
Module21=C_TicketsDia
|
||||
Module22=C_UpdateAvailable
|
||||
Module23=CameraExClass
|
||||
Module24=cPDF
|
||||
Module25=DBRequestManager
|
||||
Module26=EscPosPrinter
|
||||
Module27=FirebaseMessaging
|
||||
Module28=MAPA_RUTAS
|
||||
Module29=Starter
|
||||
Module3=BatteryUtilities
|
||||
Module30=Tracker
|
||||
Module31=V_Tclientes
|
||||
Module30=Subs
|
||||
Module31=Tracker
|
||||
Module32=V_Tclientes
|
||||
Module4=C_Bitacora
|
||||
Module5=C_Cliente
|
||||
Module6=C_Clientes
|
||||
Module7=C_ClientesCompletos
|
||||
Module8=C_Cuestionario
|
||||
Module9=C_Historico
|
||||
NumberOfFiles=113
|
||||
NumberOfFiles=114
|
||||
NumberOfLibraries=36
|
||||
NumberOfModules=31
|
||||
NumberOfModules=32
|
||||
Version=12.8
|
||||
@EndOfDesignText@
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Guna Preventa
|
||||
#VersionCode: 1
|
||||
#VersionName: 6.02.14
|
||||
#VersionName: 6.02.19
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -24,8 +24,9 @@ ModuleBookmarks29=
|
||||
ModuleBookmarks3=
|
||||
ModuleBookmarks30=
|
||||
ModuleBookmarks31=
|
||||
ModuleBookmarks32=
|
||||
ModuleBookmarks4=
|
||||
ModuleBookmarks5=7767
|
||||
ModuleBookmarks5=7786
|
||||
ModuleBookmarks6=
|
||||
ModuleBookmarks7=
|
||||
ModuleBookmarks8=
|
||||
@@ -56,6 +57,7 @@ ModuleBreakpoints29=
|
||||
ModuleBreakpoints3=
|
||||
ModuleBreakpoints30=
|
||||
ModuleBreakpoints31=
|
||||
ModuleBreakpoints32=
|
||||
ModuleBreakpoints4=
|
||||
ModuleBreakpoints5=
|
||||
ModuleBreakpoints6=
|
||||
@@ -77,23 +79,24 @@ ModuleClosedNodes19=
|
||||
ModuleClosedNodes2=
|
||||
ModuleClosedNodes20=
|
||||
ModuleClosedNodes21=
|
||||
ModuleClosedNodes22=
|
||||
ModuleClosedNodes22=4
|
||||
ModuleClosedNodes23=
|
||||
ModuleClosedNodes24=
|
||||
ModuleClosedNodes25=
|
||||
ModuleClosedNodes26=
|
||||
ModuleClosedNodes27=
|
||||
ModuleClosedNodes28=4,8,9
|
||||
ModuleClosedNodes29=
|
||||
ModuleClosedNodes28=
|
||||
ModuleClosedNodes29=4,8,9
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes30=20
|
||||
ModuleClosedNodes31=
|
||||
ModuleClosedNodes30=
|
||||
ModuleClosedNodes31=20
|
||||
ModuleClosedNodes32=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=6,8,9,10,11
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Cliente,Printer1_Connected,4521,0,C_Cliente,b_codigoAutorizacion_Click,6764,0,C_Cliente,btnAceptaPlanLealtad_Click,7532,0,B4XMainPage,cb_importarBDWA_CheckedChange,1135,0,B4XMainPage,B4XPage_Created,178,0,C_Principal,cargar_Click,1447,0,C_Principal,JobDone,1768,0,C_Cliente,Class_Globals,305,0,C_Cliente,b_venta_Click,4624,0,C_Cliente,B4XPage_Appear,674,0,C_Cliente,Camera1_PictureTaken,7774,0
|
||||
NavigationStack=Diseñador Visual,Vista_todoslosclientes.bal,-100,6,V_Tclientes,Guardar_Click,146,6,C_Principal,cargar_Click,1442,0,C_Principal,connecta_Click,2915,0,C_Principal,JobDone,1625,0,C_Principal,Subir_Click,829,0,C_Cliente,B4XPage_Appear,659,0,Diseñador Visual,cliente.bal,-100,2,C_Cliente,Mandap,3563,0,Main,Activity_Resume,45,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=28,2,17,29,5,14,18,20,4,1
|
||||
VisibleModules=29,2,18,30,5,15,19,21,4,1,32
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="gunav2.keymon.com.mx"
|
||||
android:versionCode="1"
|
||||
android:versionName="6.02.14"
|
||||
android:versionName="6.02.19"
|
||||
android:installLocation="internalOnly">
|
||||
|
||||
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="30"/>
|
||||
@@ -64,11 +64,11 @@
|
||||
<uses-permission android:name="android.hardware.camera"/>
|
||||
<uses-permission android:name="android.hardware.camera.autofocus"/>
|
||||
<uses-permission android:name="android.permission.FLASHLIGHT"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
|
||||
<uses-permission android:name="gunav2.keymon.com.mx.permission.MAPS_RECEIVE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
||||
@@ -265,18 +265,6 @@
|
||||
android:name=".appupdater$appupdater_BR"
|
||||
android:exported="true">
|
||||
</receiver>
|
||||
<service
|
||||
android:name=".tracker"
|
||||
android:exported="true"
|
||||
android:foregroundServiceType="location">
|
||||
</service>
|
||||
<receiver
|
||||
android:name=".tracker$tracker_BR"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<service
|
||||
android:name=".firebasemessaging"
|
||||
android:exported="true">
|
||||
@@ -293,6 +281,18 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="true">
|
||||
</activity>
|
||||
<service
|
||||
android:name=".tracker"
|
||||
android:exported="true"
|
||||
android:foregroundServiceType="location">
|
||||
</service>
|
||||
<receiver
|
||||
android:name=".tracker$tracker_BR"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<service
|
||||
android:name=".newinst2"
|
||||
android:exported="true">
|
||||
|
||||
BIN
B4A/Objects/AppGunaBat.apk
Normal file
BIN
B4A/Objects/AppGunaBat.apk
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user