- Se agrega codigo para que si hay venta, el boton de "NO VENTA" se deshabilite.

- Se agrega codigo para que cuando se muestre la panatalla de login se atualice la fecha en CAT_VARIABLES, porque a veces se quedaba la fecha del dia anterior y no dejaba hacer FIN DIA, era necesario cargar día y luego ya dejaba hacer FIN DIA.
This commit is contained in:
2024-02-22 21:21:26 -06:00
parent 67dc8d90bb
commit de3828ea8f
7 changed files with 29 additions and 16 deletions

View File

@@ -192,10 +192,8 @@ Private Sub B4XPage_Created (Root1 As B4XView)
ruta = Starter.ruta
Starter.tiempos.Initialize
kh.guardaAppInfo
' Try 'Intentamos usar "pragma_table_info" para revisar si existe la columna "IMPRESION" en la tabla
' c=Starter.skmt.ExecQuery("SELECT COUNT(*) AS fCol FROM pragma_table_info('kmt_info') WHERE name='IMPRESION'")
' c.Position = 0
@@ -423,6 +421,11 @@ Sub B4XPage_Appear
End If
c.Close
End If
' Log(">>>>>> FECHA")
cmd.Initialize
cmd.Name = "select_fecha"
cmd.Parameters = Array As Object("", "")
reqManager.ExecuteQuery(cmd , 0, "fecha")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
@@ -482,18 +485,14 @@ Sub JobDone(Job As HttpJob)
Starter.skmt.ExecNonQuery2("INSERT INTO VERSION(NOVERSION) VALUES (?)", Array As Object (CAT_VE_VERSION))
Next
End If
End If
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "agencia" Then 'query tag
For Each records() As Object In result.Rows
Dim ID_ALMACEN As String = records(result.Columns.Get("ID_ALMACEN"))
Next
End If
End If
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "fecha" Then 'query tag
For Each records() As Object In result.Rows
@@ -502,9 +501,7 @@ Sub JobDone(Job As HttpJob)
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("FECHA", Starter.FECHA_HOY))
Next
End If
End If
If Job.JobName = "DBRequest" Then
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "usuario" Then 'query tag
For Each records() As Object In result.Rows
@@ -515,6 +512,15 @@ Sub JobDone(Job As HttpJob)
Next
paso1 = 1
End If
Dim result As DBResult = reqManager.HandleJob(Job)
If result.Tag = "fecha" Then 'query tag
For Each records() As Object In result.Rows
Starter.FECHA_HOY = records(result.Columns.Get("FECHA"))
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("FECHA"))
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("FECHA",Starter.FECHA_HOY))
Next
End If
End If
Job.Release
End If

View File

@@ -329,7 +329,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
La_nombre.Text = c.GetString("CAT_CL_NOMBRE")
NOMBRE = c.GetString("CAT_CL_NOMBRE")
la_Calle.Text = "N/A"
Log("|"&c.GetString("CAT_CL_CALLE")&"|")
' Log("|"&c.GetString("CAT_CL_CALLE")&"|")
If c.GetString("CAT_CL_CALLE") <> Null Then la_Calle.Text = c.GetString("CAT_CL_CALLE") & c.GetString("CAT_CL_NOEXT")
la_col.Text = "N/A"
If c.GetString("CAT_CL_COLONIA") <> Null Then la_col.Text = c.GetString("CAT_CL_COLONIA")
@@ -398,6 +398,9 @@ End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub B4XPage_Appear
b_noVenta.Enabled = False
Log(kh.traeTotalCliente)
If kh.traeTotalCliente = 0 Then b_noVenta.Enabled = True
clienteId = kh.traeCliente
P_DOE.Visible = False
dentroDeGeocerca = False

View File

@@ -12,6 +12,7 @@ Sub Class_Globals
Dim ListView1 As ListView
Dim b_noventa As Button
Dim nombre_boton As String
Private l_titulo As Label
End Sub
'You can add more parameters here.
@@ -41,6 +42,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
ListView1.AddTwoLines(c.GetString("PC_CLIENTE"),"Cantidad #"& c.GetString("PC_NOART")& " SubTotal $"& NumberFormat2(c.GetString("PC_MONTO"), 1, 2, 2, True))
Next
End If
Subs.centraEtiqueta(l_titulo, Root.Width)
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
@@ -95,6 +97,7 @@ End Sub
Sub b_noventa_Click
If nombre_boton = "NOVENTA" Then
l_titulo.Text = "TICKETS NO VENTA"
nombre_boton = "VENTA"
b_noventa.Text ="VENTA"
c=Starter.skmt.ExecQuery("select NV_CLIENTE,NV_MOTIVO,NV_COMM, (select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = NV_CLIENTE ) as NOMBRE FROM NOVENTA ORDER BY NV_CLIENTE asc")
@@ -114,6 +117,7 @@ Sub b_noventa_Click
Next
End If
Else
l_titulo.Text = "TICKETS VENTA"
nombre_boton = "NOVENTA"
b_noventa.Text ="NO VENTA"
c=Starter.skmt.ExecQuery("select PC_CLIENTE,PC_MONTO,PC_NOART,(select CAT_CL_NOMBRE from kmt_info where cat_cl_codigo = pc_cliente ) as NOMBRE FROM PEDIDO_CLIENTE ORDER BY PC_FECHA asc")

Binary file not shown.

Binary file not shown.

View File

@@ -869,7 +869,7 @@ Version=12.8
#Region Project Attributes
#ApplicationLabel: Kelloggs Venta
#VersionCode: 3000
#VersionName: 4.02.17
#VersionName: 4.02.20
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#BridgeLogger:true

View File

@@ -59,9 +59,9 @@ ModuleBreakpoints7=
ModuleBreakpoints8=
ModuleBreakpoints9=
ModuleClosedNodes0=
ModuleClosedNodes1=2
ModuleClosedNodes1=2,4
ModuleClosedNodes10=
ModuleClosedNodes11=1,3,50,51,52
ModuleClosedNodes11=1,3
ModuleClosedNodes12=3
ModuleClosedNodes13=
ModuleClosedNodes14=
@@ -78,16 +78,16 @@ ModuleClosedNodes23=
ModuleClosedNodes24=
ModuleClosedNodes25=2
ModuleClosedNodes26=
ModuleClosedNodes27=9,10
ModuleClosedNodes27=2,3,7,9,10
ModuleClosedNodes28=
ModuleClosedNodes29=
ModuleClosedNodes3=3,86
ModuleClosedNodes3=86
ModuleClosedNodes4=
ModuleClosedNodes5=
ModuleClosedNodes6=
ModuleClosedNodes7=3,11,12
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=Subs,traeCliente,835,0,C_Promos,b_promoMenos_Click,375,0,C_Promos,b_promoMas_Click,425,6,C_Promos,cuentaProds,358,0,Subs,revisaMaxPromosProdsVariablesPorInventario,1346,0,Subs,traeMaxPromos,1140,1,Subs,revisaMaxPromosProdsFijosPorInventario2,1231,1,Subs,procesaPromocion,1188,1,Subs,alcanzanLosVariablesParaPromo,1119,1,Subs,traePromo,1003,5,Subs,restaFijosPromo,1093,6,Subs,traemosInventarioDisponibleParaPromo,1078,0
NavigationStack=C_Cliente,B4XPage_Created,325,0,B4XMainPage,JobDone,509,0,B4XMainPage,B4XPage_Appear,417,6,C_Principal,JobDone,1606,0,C_Principal,e_ruta_EnterPressed,2022,0,Visual Designer,ticketsDia.bal,-100,6,Visual Designer,principal.bal,-100,2,C_Principal,cargar_Click,764,0,C_Principal,e_ruta_TextChanged,2022,6,C_Principal,b_mapa_Click,2021,0
SelectedBuild=0
VisibleModules=1,27,11,3,12,4,28,13,23,2