mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-22 04:10:07 +00:00
Correcciones a la carga local:
- Se agregó que cuando se hace CARGA LOCAL, se ponga en CAT_VARIABLES el dia de la semana de hoy, se borra la fecha de FIN DIA, se pone la contraseña de FIN DIA en "CL" y se pone en FECHA el dia de hoy, para que la aplicacion sepa la fecha correcta y permita ingresar con el usuario guardado sin necesidad de contraseña.
This commit is contained in:
@@ -464,7 +464,7 @@ Sub Entrar_Click
|
|||||||
reqManager.ExecuteQuery(cmd , 0, "version")
|
reqManager.ExecuteQuery(cmd , 0, "version")
|
||||||
Else
|
Else
|
||||||
Subs.iniciaActividad("Principal")
|
Subs.iniciaActividad("Principal")
|
||||||
' B4XPages.ShowPage("Principal")
|
' B4XPages.ShowPage("Principal")a
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -499,6 +499,7 @@ Sub JobDone(Job As HttpJob)
|
|||||||
Starter.FECHA_HOY = records(result.Columns.Get("FECHA"))
|
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("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))
|
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("FECHA", Starter.FECHA_HOY))
|
||||||
|
Log("GUARDAMOS FECHA EN CAT_VARIABLES")
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -512,15 +513,6 @@ Sub JobDone(Job As HttpJob)
|
|||||||
Next
|
Next
|
||||||
paso1 = 1
|
paso1 = 1
|
||||||
End If
|
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
|
End If
|
||||||
Job.Release
|
Job.Release
|
||||||
End If
|
End If
|
||||||
@@ -751,6 +743,8 @@ Private Sub b_cargaLocalOk_Click
|
|||||||
kh.RD_restaura_kmt_info
|
kh.RD_restaura_kmt_info
|
||||||
kh.RD_restaura_promos_comp
|
kh.RD_restaura_promos_comp
|
||||||
ime.HideKeyboard
|
ime.HideKeyboard
|
||||||
|
DateTime.DateFormat = "yyyyMMdd"
|
||||||
|
Starter.skmt.ExecNonQuery($"update USUARIOA set fecha = '${DateTime.Date(DateTime.Now)}'"$)
|
||||||
ToastMessageShow("¡¡CARGA EXITOSA!!", True)
|
ToastMessageShow("¡¡CARGA EXITOSA!!", True)
|
||||||
Else
|
Else
|
||||||
ToastMessageShow("CODIGO EQUIVOCADO", True)
|
ToastMessageShow("CODIGO EQUIVOCADO", True)
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Sub B4XPage_Appear
|
|||||||
busca.Text = ""
|
busca.Text = ""
|
||||||
entro = "2"
|
entro = "2"
|
||||||
colonia = 0
|
colonia = 0
|
||||||
c = Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 and cat_cl_codigo not in (select pe_cliente from pedido) and cat_cl_codigo <> 0 AND CAT_CL_TIPO_RUTA IN (?,?) and CAT_CL_CODIGO not in (select NV_CLIENTE from NOVENTA) ORDER BY CAT_CL_NUM_SERIEFISICO", Array As String("DIA_VISITA",SEMANA, "SEMANAL"))
|
c = Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 and cat_cl_codigo not in (select pe_cliente from pedido) and cat_cl_codigo <> 0 AND CAT_CL_TIPO_RUTA IN (?,?) and CAT_CL_CODIGO not in (select NV_CLIENTE from NOVENTA) ORDER BY CAT_CL_NUM_SERIEFISICO", Array As String("DIA_VISITA", SEMANA, "SEMANAL"))
|
||||||
ListView1.Clear
|
ListView1.Clear
|
||||||
lfila.Text = "NOMBRE"
|
lfila.Text = "NOMBRE"
|
||||||
If c.RowCount > 0 Then
|
If c.RowCount > 0 Then
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ End Sub
|
|||||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||||
|
|
||||||
Sub B4XPage_Appear
|
Sub B4XPage_Appear
|
||||||
|
Log(Subs.traeDiaSemana)
|
||||||
StartBluetooth
|
StartBluetooth
|
||||||
' If Not(kh.CheckNotificationAccess) Then
|
' If Not(kh.CheckNotificationAccess) Then
|
||||||
' Msgbox2Async($"Se necesita acceso a las notificaciones, haga clic en "Aceptar" y en la siguiente pantalla permita el acceso a la aplicación "${Application.LabelName}"."$, "Permisos necesarios", "Aceptar", "", "", Null, True)
|
' Msgbox2Async($"Se necesita acceso a las notificaciones, haga clic en "Aceptar" y en la siguiente pantalla permita el acceso a la aplicación "${Application.LabelName}"."$, "Permisos necesarios", "Aceptar", "", "", Null, True)
|
||||||
@@ -1617,6 +1618,7 @@ Sub JobDone(Job As HttpJob)
|
|||||||
Starter.FECHA_HOY = records(RESULT.Columns.Get("FECHA"))
|
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("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))
|
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("FECHA",Starter.FECHA_HOY))
|
||||||
|
Log("GUARDAMOS FECHA EN CAT_VARIABLES")
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -869,7 +869,7 @@ Version=12.8
|
|||||||
#Region Project Attributes
|
#Region Project Attributes
|
||||||
#ApplicationLabel: Kelloggs Venta
|
#ApplicationLabel: Kelloggs Venta
|
||||||
#VersionCode: 3000
|
#VersionCode: 3000
|
||||||
#VersionName: 4.03.04
|
#VersionName: 4.03.20
|
||||||
#SupportedOrientations: portrait
|
#SupportedOrientations: portrait
|
||||||
#CanInstallToExternalStorage: False
|
#CanInstallToExternalStorage: False
|
||||||
#BridgeLogger:true
|
#BridgeLogger:true
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ ModuleBreakpoints7=
|
|||||||
ModuleBreakpoints8=
|
ModuleBreakpoints8=
|
||||||
ModuleBreakpoints9=
|
ModuleBreakpoints9=
|
||||||
ModuleClosedNodes0=
|
ModuleClosedNodes0=
|
||||||
ModuleClosedNodes1=2,4
|
ModuleClosedNodes1=2
|
||||||
ModuleClosedNodes10=
|
ModuleClosedNodes10=
|
||||||
ModuleClosedNodes11=1,3
|
ModuleClosedNodes11=1,3
|
||||||
ModuleClosedNodes12=3
|
ModuleClosedNodes12=3
|
||||||
@@ -88,6 +88,6 @@ ModuleClosedNodes6=
|
|||||||
ModuleClosedNodes7=3,11,12
|
ModuleClosedNodes7=3,11,12
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=C_Cliente,centroPantalla,3650,0,Main,Process_Globals,22,0,Main,Globals,24,0,Visual Designer,promociones.bal,-100,6,Subs,fechaKMT2Ticks,515,0,C_Promos,et_promoCant_TextChanged,516,6,C_Promos,b_continuar_Click,509,0,C_Cliente,Class_Globals,290,4,C_Cliente,b_encuesta_continuar_Click,3681,0,C_Cliente,Cuestionario,2199,6,C_Cliente,b_encuesta_1_Click,3659,0
|
NavigationStack=Subs,traeDiaSemana,1682,6,Subs,traeFecha,839,0,kms_helperSubs,RD_fechaRestauracionSQL,478,0,kms_helperSubs,RD_Init,65,0,B4XMainPage,B4XPage_Created,149,0,B4XMainPage,JobDone,493,6,C_Clientes,Class_Globals,0,0,C_Clientes,B4XPage_Appear,69,0,B4XMainPage,b_cargaLocalOk_Click,745,6,kms_helperSubs,Class_Globals,17,0,kms_helperSubs,RD_restaura_kmt_info,327,6,Starter,Timer1_Tick,136,0
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=1,27,11,3,12,4,28,13,23,2
|
VisibleModules=1,27,11,3,12,4,28,13,23,2
|
||||||
|
|||||||
23
B4A/Subs.bas
23
B4A/Subs.bas
@@ -1664,4 +1664,27 @@ Sub sumaPedido(cliente As String) As String 'ignore
|
|||||||
Next
|
Next
|
||||||
x.Close
|
x.Close
|
||||||
Return NumberFormat2(total, 1, 2, 2, False)
|
Return NumberFormat2(total, 1, 2, 2, False)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Regresa el dia de la semana como string.
|
||||||
|
Sub traeDiaSemana As String
|
||||||
|
Private hoyNum As Int = DateTime.GetDayOfWeek(DateTime.Now)
|
||||||
|
Private diaSemana As String = ""
|
||||||
|
Select Case hoyNum
|
||||||
|
Case 1
|
||||||
|
diaSemana = "DOMINGO"
|
||||||
|
Case 2
|
||||||
|
diaSemana = "LUNES"
|
||||||
|
Case 3
|
||||||
|
diaSemana = "MARTES"
|
||||||
|
Case 4
|
||||||
|
diaSemana = "MIERCOLES"
|
||||||
|
Case 5
|
||||||
|
diaSemana = "JUEVES"
|
||||||
|
Case 6
|
||||||
|
diaSemana = "VIERNES"
|
||||||
|
Case 7
|
||||||
|
diaSemana = "SABADO"
|
||||||
|
End Select
|
||||||
|
return diaSemana
|
||||||
End Sub
|
End Sub
|
||||||
@@ -333,6 +333,14 @@ Sub RD_restaura_kmt_info
|
|||||||
If c.RowCount > 0 Then
|
If c.RowCount > 0 Then
|
||||||
c.Position = 0
|
c.Position = 0
|
||||||
' Log(c.GetString("FECHA"))
|
' Log(c.GetString("FECHA"))
|
||||||
|
skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("DIA_VISITA"))' Ponemos el dia de hay para visita.
|
||||||
|
skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("DIA_VISITA", Subs.traeDiaSemana))
|
||||||
|
skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("FINDIA_FECHA"))' Borramos fecha de FIN DIA.
|
||||||
|
skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("FINDIA_PASS"))' Ponemos la contraseña del FIN DIA en "CL"
|
||||||
|
skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("FINDIA_PASS", "CL"))
|
||||||
|
Starter.skmt.ExecNonQuery2("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = ?", Array As Object ("FECHA")) 'Ponemos la fecha de hoy en CAT_VARIABLES para que nos deje ingresar con el usuario guardado.
|
||||||
|
Starter.skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_DESCRIPCION, CAT_VA_VALOR) VALUES (?,?)", Array As Object ("FECHA", fechaHoy))
|
||||||
|
|
||||||
skmt.ExecNonQuery("delete from kmt_info")
|
skmt.ExecNonQuery("delete from kmt_info")
|
||||||
skmt.ExecNonQuery($"insert into kmt_info (${lasCols}) select ${lasCols} from rkmt1.kmt_info where fecha = '${c.GetString("FECHA")}'"$)
|
skmt.ExecNonQuery($"insert into kmt_info (${lasCols}) select ${lasCols} from rkmt1.kmt_info where fecha = '${c.GetString("FECHA")}'"$)
|
||||||
Log($"insert into kmt_info (${lasCols}) select ${lasCols} from rkmt1.kmt_info where fecha = '${c.GetString("FECHA")}'"$)
|
Log($"insert into kmt_info (${lasCols}) select ${lasCols} from rkmt1.kmt_info where fecha = '${c.GetString("FECHA")}'"$)
|
||||||
|
|||||||
Reference in New Issue
Block a user