mirror of
https://github.com/KeymonSoft/Marquez.git
synced 2026-04-20 22:29:28 +00:00
VERSION 4.07.04 SE AGREGA RECARGA Y SE CORRIGE QUE NO GUARDABA CUANDO ERA UN CLIENTE FUERA DE FRECUENCIA.
SALUDOS.
This commit is contained in:
@@ -118,6 +118,8 @@ Sub Class_Globals
|
||||
Private b_cancelarcodigo As Button
|
||||
Private b_aceptar As Button
|
||||
Private p_validacion As Panel
|
||||
Private b_recarga As Button
|
||||
Dim recarga As String = "0"
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -287,6 +289,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
End Sub
|
||||
|
||||
Sub B4XPage_Appear
|
||||
Log(recarga)
|
||||
If Starter.muestraProgreso = 1 Then
|
||||
muestraProgreso("Descargando actualización")
|
||||
Starter.muestraProgreso = 0
|
||||
@@ -591,7 +594,15 @@ Sub JobDone(Job As HttpJob)
|
||||
Log(CAT_PA_PASS)
|
||||
p_validacion.Visible = False
|
||||
et_codigo.Text = ""
|
||||
Subs.panelVisible(P_CIEGO,0,0)
|
||||
If recarga = "0" Then
|
||||
Subs.panelVisible(P_CIEGO,0,0)
|
||||
Else If recarga = "1" Then
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("1"))
|
||||
B4XPages.MainPage.tipo_venta = "RECARGA"
|
||||
B4XPages.ShowPage("Productos")
|
||||
|
||||
End If
|
||||
Else
|
||||
MsgboxAsync("Contraseña incorrecta","Atención")
|
||||
End If
|
||||
@@ -817,21 +828,7 @@ Private Sub lv_server_ItemClick (Position As Int, Value As Object)
|
||||
End Sub
|
||||
|
||||
Private Sub b_enviarbd_Click
|
||||
' copiaDB
|
||||
' Sleep(1000)
|
||||
Dim FileName As String = "kmt.db"
|
||||
'copy the shared file to the shared folder
|
||||
Log("xxxxxx:"&Provider.SharedFolder)
|
||||
Sleep(1000)
|
||||
File.Copy(File.DirInternal, FileName, Provider.SharedFolder, FileName)
|
||||
Dim email As Email
|
||||
email.To.Add("soporte@keymonsoft.com")
|
||||
email.Subject = "Envio Base de datos Marquez"
|
||||
email.Attachments.Add(Provider.GetFileUri(FileName))
|
||||
' email.Attachments.Add(Provider.GetFileUri(FileName)) 'second attachment
|
||||
Dim in As Intent = email.GetIntent
|
||||
in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
|
||||
StartActivity(in)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub b_importarBD_Click
|
||||
@@ -852,11 +849,10 @@ Private Sub b_arqueocieego_Click
|
||||
c = skmt.ExecQuery("SELECT * FROM CAT_GUNAPROD")
|
||||
If c.RowCount > 0 Then
|
||||
Subs.panelVisible(p_validacion,0,0)
|
||||
recarga = "0"
|
||||
Else
|
||||
MsgboxAsync("No hay ruta cargada, favor de cargar día","Atención")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub et_buspc_TextChanged (Old As String, New As String)
|
||||
@@ -878,7 +874,7 @@ Private Sub et_buspc_TextChanged (Old As String, New As String)
|
||||
Next
|
||||
c.Close
|
||||
|
||||
d=B4XPages.MainPage.skmt.ExecQuery2($"select CAT_GP_NOMBRE, CAT_GP_ID FROM CAT_GUNAPROD WHERE (CAT_GP_NOMBRE LIKE ? OR CAT_GP_ID LIKE ? ) and CAT_GP_CLASIF <> 'PROMOS'"$, Array As String(q_buscar,q_buscar))
|
||||
d=B4XPages.MainPage.skmt.ExecQuery2($"select CAT_GP_NOMBRE, CAT_GP_ID FROM CAT_GUNAPROD WHERE (CAT_GP_NOMBRE LIKE ? OR CAT_GP_ID LIKE ? ) and CAT_GP_CLASIF <> 'PROMOS'AND CAT_GP_ID NOT IN (SELECT PC_ID_PROD FROM PICK_CIEGO)"$, Array As String(q_buscar,q_buscar))
|
||||
|
||||
For i = 0 To d.RowCount - 1
|
||||
d.Position = i
|
||||
@@ -940,9 +936,12 @@ End Sub
|
||||
|
||||
Private Sub B_PC_ENV_Click
|
||||
|
||||
Dim sDate As String
|
||||
DateTime.DateFormat = "MM/dd/yyyy"
|
||||
Dim sDate, stime As String
|
||||
DateTime.DateFormat = "dd/MM/yyyy"
|
||||
DateTime.TimeFormat = "HH:mm:ss"
|
||||
sDate = DateTime.Date(DateTime.Now)
|
||||
stime = DateTime.Time(DateTime.Now)
|
||||
|
||||
|
||||
For i = 0 To CLV_PICK_CIEGO.Size - 1
|
||||
' Retrieve the panel and child views for the current item
|
||||
@@ -960,26 +959,29 @@ Private Sub B_PC_ENV_Click
|
||||
Dim idLabel As B4XView = innerPanel.GetView(0)
|
||||
Dim idText As String = idLabel.As(Label).Text
|
||||
Dim idParts() As String = Regex.Split(CRLF, idText)
|
||||
Log(idParts(1))
|
||||
' Log(idParts(1))
|
||||
f=B4XPages.MainPage.skmt.ExecQuery("select CAT_CL_RUTA from kmt_info")
|
||||
f.Position=0
|
||||
|
||||
a=B4XPages.MainPage.skmt.ExecQuery("select ID_ALMACEN from CAT_ALMACEN")
|
||||
If a.RowCount>0 Then
|
||||
a.Position=0
|
||||
End If
|
||||
Log(a.GetString("ID_ALMACEN"))
|
||||
Log(f.GetString("CAT_CL_RUTA"))
|
||||
' Log(a.GetString("ID_ALMACEN"))
|
||||
' Log(f.GetString("CAT_CL_RUTA"))
|
||||
|
||||
If inputText <> 0 Then
|
||||
c = Starter.skmt.ExecQuery2("SELECT * FROM PICK_CIEGO where PC_ID_PROD = ?", Array As String (idParts(0)))
|
||||
If c.RowCount = 0 Then
|
||||
' Insert data into the database
|
||||
skmt.ExecNonQuery2("INSERT INTO PICK_CIEGO(PC_ID_PROD, PC_NOM_PROD, PC_CANT, PC_ALMACEN, PC_RUTA, PC_FECHA) VALUES(?,?,?,?,?,?)", Array As String(idParts(0), idParts(1), inputText, a.GetString("ID_ALMACEN"), f.GetString("CAT_CL_RUTA"), sDate))
|
||||
skmt.ExecNonQuery2("INSERT INTO PICK_CIEGO(PC_ID_PROD, PC_NOM_PROD, PC_CANT, PC_ALMACEN, PC_RUTA, PC_FECHA) VALUES(?,?,?,?,?,?)", Array As String(idParts(0), idParts(1), inputText, a.GetString("ID_ALMACEN"), f.GetString("CAT_CL_RUTA"), sDate&" "&stime))
|
||||
Else
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("Update PICK_CIEGO set PC_CANT = ? WHERE PC_ID_PROD = ?" , Array As String(inputText ,idParts(0)))
|
||||
End If
|
||||
End If
|
||||
f.Close
|
||||
a.Close
|
||||
Log("Processed item " & i)
|
||||
' Log("Processed item " & i)
|
||||
Next
|
||||
et_buspc.Text = ""
|
||||
CLV_PICK_CIEGO.Clear
|
||||
@@ -994,9 +996,11 @@ Private Sub b_terpc_Click
|
||||
Wait For Msgbox_Result (resultado As Int)
|
||||
If resultado = DialogResponse.POSITIVE Then
|
||||
|
||||
Dim sDate As String
|
||||
DateTime.DateFormat = "MM/dd/yyyy"
|
||||
Dim sDate, stime As String
|
||||
DateTime.DateFormat = "dd/MM/yyyy"
|
||||
DateTime.TimeFormat = "HH:mm:ss"
|
||||
sDate = DateTime.Date(DateTime.Now)
|
||||
stime = DateTime.Time(DateTime.Now)
|
||||
|
||||
For i = 0 To CLV_PICK_CIEGO.Size - 1
|
||||
' Retrieve the panel and child views for the current item
|
||||
@@ -1029,7 +1033,7 @@ Private Sub b_terpc_Click
|
||||
c = Starter.skmt.ExecQuery2("SELECT * FROM PICK_CIEGO where PC_ID_PROD = ?", Array As String (idParts(0)))
|
||||
If c.RowCount = 0 Then
|
||||
' Insert data into the database
|
||||
skmt.ExecNonQuery2("INSERT INTO PICK_CIEGO(PC_ID_PROD, PC_NOM_PROD, PC_CANT, PC_ALMACEN, PC_RUTA, PC_FECHA) VALUES(?,?,?,?,?,?)", Array As String(idParts(0), idParts(1), inputText, a.GetString("ID_ALMACEN"), f.GetString("CAT_CL_RUTA"), sDate))
|
||||
skmt.ExecNonQuery2("INSERT INTO PICK_CIEGO(PC_ID_PROD, PC_NOM_PROD, PC_CANT, PC_ALMACEN, PC_RUTA, PC_FECHA) VALUES(?,?,?,?,?,?)", Array As String(idParts(0), idParts(1), inputText, a.GetString("ID_ALMACEN"), f.GetString("CAT_CL_RUTA"), sDate&" "&stime))
|
||||
Else
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("Update PICK_CIEGO set PC_CANT = ? WHERE PC_ID_PROD = ?" , Array As String(inputText ,idParts(0)))
|
||||
End If
|
||||
@@ -1087,4 +1091,32 @@ End Sub
|
||||
|
||||
Private Sub b_cancelarcodigo_Click
|
||||
p_validacion.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub b_envioBD_Click
|
||||
' copiaDB
|
||||
' Sleep(1000)
|
||||
Dim FileName As String = "kmt.db"
|
||||
'copy the shared file to the shared folder
|
||||
Log("xxxxxx:"&Provider.SharedFolder)
|
||||
Sleep(1000)
|
||||
File.Copy(File.DirInternal, FileName, Provider.SharedFolder, FileName)
|
||||
Dim email As Email
|
||||
email.To.Add("soporte@keymonsoft.com")
|
||||
email.Subject = "Envio Base de datos Marquez"
|
||||
email.Attachments.Add(Provider.GetFileUri(FileName))
|
||||
' email.Attachments.Add(Provider.GetFileUri(FileName)) 'second attachment
|
||||
Dim in As Intent = email.GetIntent
|
||||
in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
|
||||
StartActivity(in)
|
||||
End Sub
|
||||
|
||||
Private Sub b_recarga_Click
|
||||
c = skmt.ExecQuery("SELECT * FROM CAT_GUNAPROD")
|
||||
If c.RowCount > 0 Then
|
||||
Subs.panelVisible(p_validacion,0,0)
|
||||
recarga = "1"
|
||||
Else
|
||||
MsgboxAsync("No hay ruta cargada, favor de cargar día","Atención")
|
||||
End If
|
||||
End Sub
|
||||
Reference in New Issue
Block a user