mirror of
https://github.com/KeymonSoft/Guna_Preventa.git
synced 2026-04-17 21:06:32 +00:00
- VERSION 4.11.02
- Se corrige que cuando en el catalogo de productos se pone una cantidad de producto y luego se borra directamente en la cantidad, se quedaba la cantidad previamente selecionada. - Se pone codigo para que se maneje Venta y Preventa, se lee la información de CAT_RUTAS/CAT_RU_CATEGORIA, falta la parte de "AMBOS". (En revision por Dulce) - Se agregaron 7 almacenes para que se active la encuesta de Pedigree.
This commit is contained in:
@@ -487,9 +487,6 @@ End Sub
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
gest.Text = "PreVenta"
|
||||
If Subs.traeTipoVentaDeBD = "VENTA" Then gest.Text = "Venta"
|
||||
If la_cuenta.Text = "0" Then gest.Text = "Carga Abordo"
|
||||
iniciofin
|
||||
que_modulo = 1
|
||||
dentroDeGeocerca = False
|
||||
@@ -512,13 +509,13 @@ Sub B4XPage_Appear
|
||||
b_Inicio_Fin_venta.Text = "INICIAR VENTA"
|
||||
b_Inicio_Fin_venta.BringToFront
|
||||
' LogColor(">>>>>> EN VENTA: " & Starter.enVenta, Colors.red)
|
||||
If Not(Starter.enVenta) Then
|
||||
b_Inicio_Fin_venta.Visible = True
|
||||
Log("EnVenta Visible")
|
||||
Else
|
||||
Log("EnVenta NO Visible")
|
||||
b_Inicio_Fin_venta.Visible = False
|
||||
End If
|
||||
' If Not(Starter.enVenta) Then
|
||||
' b_Inicio_Fin_venta.Visible = True
|
||||
' Log("EnVenta Visible")
|
||||
' Else
|
||||
' Log("EnVenta NO Visible")
|
||||
' b_Inicio_Fin_venta.Visible = False
|
||||
' End If
|
||||
|
||||
If Subs.hayPedido Then 'Si hay pedido, deshabilitamos el boton de "No Venta"
|
||||
Log(">>>>> HAY PEDIDO")
|
||||
@@ -915,6 +912,10 @@ Sub B4XPage_Appear
|
||||
b_Inicio_Fin_venta.Visible = False
|
||||
' ToastMessageShow("aaa", False)
|
||||
End If
|
||||
gest.Text = "PreVenta"
|
||||
If Subs.traeTipoVentaDeBD = "VENTA" Then gest.Text = "Venta"
|
||||
Log($">>>>>>>>>> |${la_cuenta.Text.trim}|"$)
|
||||
If la_cuenta.Text.trim = "0" Then gest.Text = "Carga Abordo"
|
||||
' Log($"ALMACEN: ${ALMACEN}${CRLF}RUTA:${LA_RUTA}"$)
|
||||
End Sub
|
||||
|
||||
@@ -1118,17 +1119,13 @@ End Sub
|
||||
|
||||
'Muestra u oculta el boton de inicio y fin de venta
|
||||
Private Sub iniciofin
|
||||
Log(">>>>> " & Starter.enVenta)
|
||||
If Starter.enVenta = False Then
|
||||
Log(333)
|
||||
p_transparenteInicioFin.BringToFront
|
||||
p_transparenteInicioFin.Visible = True
|
||||
b_Inicio_Fin_venta.Visible = True
|
||||
' Log("Hacemos visible el boton de Inicio Venta")
|
||||
Else
|
||||
Log(4444)
|
||||
If b_Inicio_Fin_venta.Text <> "TERMINAR VENTA" Then
|
||||
Log(555)
|
||||
p_transparenteInicioFin.Visible = False
|
||||
b_Inicio_Fin_venta.Visible = False
|
||||
End If
|
||||
@@ -1221,13 +1218,24 @@ Sub gest_Click
|
||||
' En SCAT es ruta 3
|
||||
' Norte 45 (79) Rutas: 702, 703, 707, 718, 730, 732, 733, 734.
|
||||
|
||||
' COACALCO- 35--
|
||||
' NORTE 45- 75--
|
||||
' ATIZAPAN- 56--
|
||||
' VALLEJO- 73--
|
||||
' IZTAPALAPA- 43--
|
||||
' CEDA- 54--
|
||||
' PACHUCA- 15--
|
||||
|
||||
Private rutasEncuesta As List
|
||||
rutasEncuesta.Initialize2(Array As Int(702, 703, 707, 718, 730, 732, 733, 734))
|
||||
Private alamcenesEncuesta As List
|
||||
alamcenesEncuesta.Initialize2(Array As Int(15, 35, 43, 54, 56, 73, 75, 79)) ' Almacenes para la encuesta de Pedigree
|
||||
|
||||
' ALMACEN = 79
|
||||
' LA_RUTA = 732
|
||||
' Or (ALMACEN = 79 And rutasEncuesta.IndexOf(LA_RUTA.As(Int)) > -1)
|
||||
|
||||
If (ALMACEN = 6 And LA_RUTA = 3) Or (ALMACEN = 79 And rutasEncuesta.IndexOf(LA_RUTA.As(Int)) > -1) Then
|
||||
If (alamcenesEncuesta.IndexOf(ALMACEN.As(Int)) > -1 ) Or (ALMACEN = 6 And LA_RUTA = 3) Then
|
||||
Log($"${cuest.encuestaIniciada} - ${cuest.clienteConCuestionario(Subs.traeCliente)}"$)
|
||||
If Not(cuest.encuestaIniciada) And Not(cuest.clienteConCuestionario(Subs.traeCliente)) Then
|
||||
cuest.agregaPreguntaCheckbox("1", "¿Qué productos de Kileo Perro encuentras en esta tienda?", Array As String("Pedigree Adulto", "Pedigree Cachorro", "Pedigree Razas Pequeñas", "Champ", "PAL","DOG CHOW ADULTO","DOG CHOW CACHORRO","DOG CHOW RAZAS PEQUEÑAS","Campeon","Ganador","Poder canino","Perron","Silverkan","Woow","Chapetes","Dyno","Beriscan","Nogacan","Nutrescan","Fidus","Amigo Gourmet","Otros","Ninguno de los anteriores"))
|
||||
@@ -4724,7 +4732,6 @@ Private Sub StopCamera2
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub b_Inicio_Fin_venta_Click
|
||||
' b_Inicio_Fin_venta.Visible = False
|
||||
' Subs.bitacora(Subs.fechanormal(DateTime.Now), usuario, Subs.traeAlmacen, Subs.traeRuta, "Pre-venta", "0", Subs.fechanormal(DateTime.Now), Subs.fechanormal(DateTime.Now), B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps, precision, "", "")
|
||||
|
||||
@@ -347,6 +347,7 @@ Sub B4XPage_Appear
|
||||
' LogColor($"########## ${Subs.traeRuta} ##########"$, Colors.red)
|
||||
p_principal.Visible = True
|
||||
' Log($"|${Subs.traeTipoVentaDeBD}|"$)
|
||||
|
||||
If Subs.traeTipoVentaDeBD = "VENTA" Or Subs.traeTipoVentaDeBD = "ABORDO" Then b_abordo.Visible = True Else b_abordo.Visible = False
|
||||
E_RUTA2.Text = ""
|
||||
p_ruta2.Visible = False
|
||||
@@ -844,7 +845,11 @@ Sub Subir_Click
|
||||
End Sub
|
||||
|
||||
Sub cargar_Click
|
||||
Private i As Int = Regex.Replace("[^0-9.]", e_ruta.text,"") 'Quitamos alfanumericos y convertimos en entero.
|
||||
e_ruta.text = i
|
||||
If E_RUTA2.Visible = True Then
|
||||
Private i2 As Int = Regex.Replace("[^0-9.]", E_RUTA2.text,"") 'Quitamos alfanumericos y convertimos en entero.
|
||||
E_RUTA2.text = i2
|
||||
Rut_Rep = e_ruta.Text & " " & E_RUTA2.Text
|
||||
Else
|
||||
Rut_Rep = e_ruta.Text
|
||||
@@ -2078,49 +2083,58 @@ Sub connecta_Click
|
||||
p_transparenteActualizacion.Visible = False
|
||||
B4XPages.ShowPage("Login")
|
||||
Else ' No hay actualización, continuamos con la carga.
|
||||
p_transparenteActualizacion.Visible = False
|
||||
B4XPages.MainPage.reqManager.Initialize(Me, Starter.server)
|
||||
teclado.HideKeyboard
|
||||
connecta1 = connecta1 + 1
|
||||
'imei = p.GetDeviceId
|
||||
conn = "1"
|
||||
Dim cmd As DBCommand
|
||||
cmd.Initialize
|
||||
cmd.Name = "select_version_GV2"
|
||||
B4XPages.MainPage.reqManager.ExecuteQuery(cmd , 0, "version")
|
||||
' Cuando nos conectamos verificamos que el usuario guardado en BD sea VALIDO.
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select USUARIO, PASS from usuarioa")
|
||||
c.Position=0
|
||||
If c.RowCount > 0 And c.GetString("USUARIO") <> "KMTS1" Then
|
||||
Private usrT As String = c.GetString("USUARIO")
|
||||
Private passT As String = c.GetString("PASS")
|
||||
Try
|
||||
Private i As Int = Regex.Replace("[^0-9.]", e_ruta.text,"") 'Quitamos alfanumericos y convertimos en entero.
|
||||
Log($"|${i}|"$)
|
||||
e_ruta.text = i
|
||||
p_transparenteActualizacion.Visible = False
|
||||
B4XPages.MainPage.reqManager.Initialize(Me, Starter.server)
|
||||
teclado.HideKeyboard
|
||||
connecta1 = connecta1 + 1
|
||||
'imei = p.GetDeviceId
|
||||
conn = "1"
|
||||
Dim cmd As DBCommand
|
||||
cmd.Initialize
|
||||
cmd.Name = "select_usuario_guna_GV2_10"
|
||||
cmd.Parameters = Array As Object(usrT, passT)
|
||||
B4XPages.MainPage.reqManager.ExecuteQuery(cmd , 0, "usuarioA")
|
||||
End If
|
||||
c.Close
|
||||
If e_ruta.Text = "BERNA1" Then
|
||||
cargar.Visible = True
|
||||
Subir.Visible = True
|
||||
e_ruta.Text = ""
|
||||
End If
|
||||
ToastMessageShow("Validando Conexión." , True)
|
||||
If connecta1 / 2 = 1 Then
|
||||
'SERVER = "http://177.244.63.54:1782"
|
||||
'SERVER = "http://keymon.com.mx:1782"
|
||||
'SERVER = "http://201.99.139.28:1782"
|
||||
' B4XPages.MainPage.SERVER = "http://187.189.244.154:1782"
|
||||
' SERVER = "http://10.0.0.205:1782"
|
||||
B4XPages.MainPage.reqManager.Initialize(Me, Starter.server)
|
||||
Else
|
||||
'SERVER = "http://keymon.com.mx:1782"
|
||||
'SERVER = "http://201.99.139.28:1782"
|
||||
'SERVER = "http://177.244.63.54:1782"
|
||||
' B4XPages.MainPage.SERVER = "http://187.189.244.154:1782"
|
||||
' SERVER = "http://10.0.0.205:1782"
|
||||
B4XPages.MainPage.reqManager.Initialize(Me, Starter.server)
|
||||
End If
|
||||
cmd.Name = "select_version_GV2"
|
||||
B4XPages.MainPage.reqManager.ExecuteQuery(cmd , 0, "version")
|
||||
' Cuando nos conectamos verificamos que el usuario guardado en BD sea VALIDO.
|
||||
c=B4XPages.MainPage.skmt.ExecQuery("select USUARIO, PASS from usuarioa")
|
||||
c.Position=0
|
||||
If c.RowCount > 0 And c.GetString("USUARIO") <> "KMTS1" Then
|
||||
Private usrT As String = c.GetString("USUARIO")
|
||||
Private passT As String = c.GetString("PASS")
|
||||
cmd.Initialize
|
||||
cmd.Name = "select_usuario_guna_GV2_10"
|
||||
cmd.Parameters = Array As Object(usrT, passT)
|
||||
B4XPages.MainPage.reqManager.ExecuteQuery(cmd , 0, "usuarioA")
|
||||
End If
|
||||
c.Close
|
||||
If e_ruta.Text = "BERNA1" Then
|
||||
cargar.Visible = True
|
||||
Subir.Visible = True
|
||||
e_ruta.Text = ""
|
||||
End If
|
||||
ToastMessageShow("Validando Conexión." , True)
|
||||
If connecta1 / 2 = 1 Then
|
||||
'SERVER = "http://177.244.63.54:1782"
|
||||
'SERVER = "http://keymon.com.mx:1782"
|
||||
'SERVER = "http://201.99.139.28:1782"
|
||||
' B4XPages.MainPage.SERVER = "http://187.189.244.154:1782"
|
||||
' SERVER = "http://10.0.0.205:1782"
|
||||
B4XPages.MainPage.reqManager.Initialize(Me, Starter.server)
|
||||
Else
|
||||
'SERVER = "http://keymon.com.mx:1782"
|
||||
'SERVER = "http://201.99.139.28:1782"
|
||||
'SERVER = "http://177.244.63.54:1782"
|
||||
' B4XPages.MainPage.SERVER = "http://187.189.244.154:1782"
|
||||
' SERVER = "http://10.0.0.205:1782"
|
||||
B4XPages.MainPage.reqManager.Initialize(Me, Starter.server)
|
||||
End If
|
||||
Catch
|
||||
Log(LastException)
|
||||
End Try
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -82,6 +82,7 @@ End Sub
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
tipo_venta = Subs.traeTipoVentaDeBD
|
||||
LogColor(tipo_venta, Colors.red)
|
||||
prodsMap.Initialize
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2($"UPDATE ${Subs.traeTablaProds(tipo_venta)} SET CAT_GP_TIPOPROD = (?) WHERE CAT_GP_TIPOPROD = (?)"$,Array As Object("PRIORITARIO","1"))
|
||||
@@ -539,22 +540,27 @@ Sub b_prodMas_Click
|
||||
End Sub
|
||||
|
||||
Private Sub et_pCant_TextChanged (Old As String, New As String)
|
||||
' LogColor($"txt changed: ${Old}|${New}, hasfocus=${etCantHasFocus}"$,Colors.Magenta)
|
||||
Try
|
||||
LogColor($"txt changed: ${Old}|${New}, hasfocus=${etCantHasFocus}"$,Colors.Magenta)
|
||||
' Try
|
||||
Dim index As Int = clv_productos.GetItemFromView(Sender)
|
||||
Dim pnl0 As B4XView = clv_productos.GetPanel(index)
|
||||
Dim pnl As B4XView = pnl0.GetView(0)
|
||||
Dim laCant As B4XView = pnl.GetView(2).GetView(3)
|
||||
Dim esteTag As List = Regex.Split("\|", laCant.Tag)
|
||||
' Log($"${esteTag}, ${laCant.text}"$)
|
||||
If New = "" Then
|
||||
laCant.Text = "0"
|
||||
New = "0"
|
||||
End If
|
||||
If esteTag.Get(1) < New Then laCant.Text = esteTag.Get(1)
|
||||
If Not(Old = "0" And New = "") And etCantHasFocus Then
|
||||
Log(esteTag)
|
||||
' Log(esteTag)
|
||||
Subs.actualizaProducto(Subs.traeAlmacen, esteTag.Get(0), laCant.Text, Subs.traeProdNombre(esteTag.Get(2)), esteTag.Get(2), Subs.traeCliente, Subs.traeFecha, Subs.traeUsuarioDeBD, Subs.traeRuta, 0, B4XPages.MainPage.tipo_venta)
|
||||
cuentaProds
|
||||
End If
|
||||
Catch
|
||||
Log(LastException)
|
||||
End Try
|
||||
' Catch
|
||||
' Log(LastException)
|
||||
' End Try
|
||||
End Sub
|
||||
|
||||
Sub et_pCant_Click
|
||||
@@ -570,6 +576,8 @@ Private Sub et_pCant_FocusChanged (HasFocus As Boolean)
|
||||
Dim pnl0 As B4XView = clv_productos.GetPanel(index)
|
||||
Dim pnl As B4XView = pnl0.GetView(0)
|
||||
Dim laCant As B4XView = pnl.GetView(2).GetView(3)
|
||||
Log($"LaCant = ${laCant.text}"$)
|
||||
If laCant.Text = "" Then laCant.Text = "0"
|
||||
Dim esteTag As List = Regex.Split("\|", laCant.Tag)
|
||||
Log(esteTag)
|
||||
Log(laCant.text)
|
||||
|
||||
Binary file not shown.
@@ -253,7 +253,7 @@ Version=12.8
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Guna Preventa
|
||||
#VersionCode: 1
|
||||
#VersionName: 4.10.28
|
||||
#VersionName: 4.11.02
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -55,7 +55,7 @@ ModuleClosedNodes1=11,13,14
|
||||
ModuleClosedNodes10=
|
||||
ModuleClosedNodes11=
|
||||
ModuleClosedNodes12=6
|
||||
ModuleClosedNodes13=3
|
||||
ModuleClosedNodes13=1,3
|
||||
ModuleClosedNodes14=3,17
|
||||
ModuleClosedNodes15=
|
||||
ModuleClosedNodes16=
|
||||
@@ -70,12 +70,12 @@ ModuleClosedNodes23=3,4,5,6,7,8,9
|
||||
ModuleClosedNodes24=
|
||||
ModuleClosedNodes25=
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes4=
|
||||
ModuleClosedNodes4=3
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=8,9,10,11
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Principal,B4XPage_Appear,342,5,Subs,revisaProdFueraDePromo,1699,0,C_Cliente,B4XPage_Created,474,0,C_Cliente,p_pideGeoPass_Click,1106,0,Visual Designer,cliente.bal,-100,6,Subs,traeTipoVentaDeBD,1711,6,Tracker,flp_LocationChanged,174,0,C_Cliente,iniciofin,1110,6,C_Cliente,GPS_LocationChanged,1084,1,C_Cliente,B4XPage_Appear,508,6
|
||||
NavigationStack=C_Productos,et_pCant_TextChanged,537,6,Visual Designer,cliente.bal,-100,2,Subs,traeTablaProds,1683,0,Subs,agregaColumna,1182,0,Starter,JobDone,139,0,Starter,Application_Error,135,0,C_Principal,e_ruta_Click,2811,0,C_Principal,B_OK_PANEL5_Click,2804,0,C_Principal,JobDone,1177,0,C_Cliente,gest_Click,1226,6,Main,Globals,23,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=23,2,13,24,4,5,14,9,25
|
||||
|
||||
@@ -1687,7 +1687,7 @@ End Sub
|
||||
Sub traeTablaProds(tipoventa As String) As String
|
||||
Private tablaProds As String = "cat_gunaprod2"
|
||||
If tipoventa = "ABORDO" Or tipoventa = "PREVENTA" Then tablaProds = "cat_gunaprod"
|
||||
LogColor($"Tipo= ${tipoventa}, tabla=${tablaProds}"$, Colors.RGB(200,136,0))
|
||||
' LogColor($"Tipo= ${tipoventa}, tabla=${tablaProds}"$, Colors.RGB(200,136,0))
|
||||
Return tablaProds
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user