mirror of
https://github.com/KeymonSoft/Marquez.git
synced 2026-04-19 13:49:18 +00:00
cambios isac
This commit is contained in:
@@ -112,7 +112,6 @@ Sub Class_Globals
|
||||
Private bpv1 As BatteryProgressView
|
||||
Dim batterystatus(11) As Int
|
||||
Private bu As BatteryUtilities
|
||||
Private Panel4 As Panel
|
||||
Private L_NES As Label
|
||||
Private L_REAL As Label
|
||||
Private L_ALCANCE As Label
|
||||
@@ -215,6 +214,12 @@ Sub Class_Globals
|
||||
Private L_PREVENTA As Label
|
||||
Private p_abordo As Panel
|
||||
Private Panel11 As Panel
|
||||
Private CLV_PICK_CIEGO As CustomListView
|
||||
Private P_PICK_CIEGO As Panel
|
||||
Dim ET_PICK_CIEGO As EditText
|
||||
Private L_PICK_CIEGO As Label
|
||||
Private P_CIEGO As Panel
|
||||
Dim Panel4 As Panel
|
||||
End Sub
|
||||
|
||||
'You can add more parameters here.
|
||||
@@ -536,9 +541,99 @@ Sub B4XPage_Appear
|
||||
p_abordo.Visible = True
|
||||
End If
|
||||
|
||||
' d = B4XPages.MainPage.skmt.ExecQuery("SELECT CAT_GP_ID, CAT_GP_NOMBRE FROM CAT_GUNAPROD2")
|
||||
' CLV_PICK_CIEGO.Clear
|
||||
' For i = 0 To d.RowCount - 1
|
||||
' d.Position = i
|
||||
' CLV_PICK_CIEGO.Add(CreateListItem(d.GetString("CAT_GP_ID"), d.GetString("CAT_GP_NOMBRE")),i)
|
||||
' Log(d.GetString("CAT_GP_ID"))
|
||||
' Log(d.GetString("CAT_GP_NOMBRE"))
|
||||
' Next
|
||||
' d.Close
|
||||
|
||||
End Sub
|
||||
|
||||
Sub ET_PICK_CIEGO_TextChanged (Old As String, New As String)
|
||||
Dim et As EditText = Sender
|
||||
If New.Length > 4 Then
|
||||
et.Text = Old
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub B_PC_ENV_Click
|
||||
|
||||
Dim sDate As String
|
||||
DateTime.DateFormat = "MM/dd/yyyy"
|
||||
sDate = DateTime.Date(DateTime.Now)
|
||||
|
||||
For i = 0 To CLV_PICK_CIEGO.Size - 1
|
||||
' Retrieve the panel and child views for the current item
|
||||
Dim itemPanel As B4XView = CLV_PICK_CIEGO.GetPanel(i)
|
||||
Dim innerPanel As B4XView = itemPanel.GetView(0)
|
||||
Dim editText As B4XView = innerPanel.GetView(1)
|
||||
Dim inputText As String = editText.As(EditText).Text
|
||||
|
||||
' Check if the input text matches the regex pattern for zeros or if it's empty
|
||||
If Regex.IsMatch("^[0]+$", inputText) Or inputText = "" Then
|
||||
inputText = "0"
|
||||
End If
|
||||
|
||||
' Retrieve and process the ID label
|
||||
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))
|
||||
|
||||
' Insert data into the database
|
||||
Log($"Inserting: PC_ID_PROD=${idParts(0)}, PC_NOM_PROD=${idParts(1)}, PC_CANT=${inputText}, PC_ALMACEN=${ALMACEN}, PC_RUTA=${l_ruta.Text}, PC_FECHA=${sDate}"$)
|
||||
B4XPages.MainPage.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, ALMACEN, l_ruta.Text, sDate))
|
||||
|
||||
Log("Processed item " & i)
|
||||
Next
|
||||
|
||||
Log("Finished processing all items")
|
||||
P_CIEGO.Visible = False
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Sub Subir_Click
|
||||
Msgbox2Async("Parara hacer el envio de tu Informacion, antes debes revisar tu inventario abordo, ¿Deceas revisarlo?", "ATENCION","SI","", "NO",LoadBitmap(File.DirAssets,"alert2.png"), False)
|
||||
Wait For Msgbox_Result (resultado As Int)
|
||||
If resultado = DialogResponse.POSITIVE Then
|
||||
P_CIEGO.Visible=True
|
||||
Log(2)
|
||||
d = B4XPages.MainPage.skmt.ExecQuery("SELECT CAT_GP_ID, CAT_GP_NOMBRE FROM CAT_GUNAPROD2 WHERE CAT_GP_CLASIF <> 'PROMOS'")
|
||||
CLV_PICK_CIEGO.Clear
|
||||
For i = 0 To d.RowCount - 1
|
||||
d.Position = i
|
||||
CLV_PICK_CIEGO.Add(CreateListItem(d.GetString("CAT_GP_ID"), d.GetString("CAT_GP_NOMBRE")),i)
|
||||
' Log(d.GetString("CAT_GP_ID"))
|
||||
' Log(d.GetString("CAT_GP_NOMBRE"))
|
||||
Next
|
||||
d.Close
|
||||
|
||||
Else
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub CreateListItem(Id_prod As String, Prod As String) As Panel
|
||||
Dim pa As B4XView = xui.CreatePanel("")
|
||||
pa.SetLayoutAnimated(0, 0, 0, 1, 10)
|
||||
pa.LoadLayout("PANEL_PICK_CIEGO")
|
||||
pa.Height = 55dip
|
||||
pa.Width = 298dip
|
||||
'pa.Width = clv_orden.GetBase.Width
|
||||
L_PICK_CIEGO.Text = Id_prod & CRLF & Prod
|
||||
L_PICK_CIEGO.TextSize = 12
|
||||
L_PICK_CIEGO.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.CENTER_HORIZONTAL)
|
||||
'cxc.Id_prod = mostrar3
|
||||
'Log(pa.Width)
|
||||
Return pa
|
||||
End Sub
|
||||
|
||||
Sub envio_info
|
||||
CARGA = "SUBIR"
|
||||
p_mandaInfo.Width = Root.Width
|
||||
p_mandaInfo.Height = Root.Height
|
||||
@@ -2083,6 +2178,7 @@ Sub e_ruta_EnterPressed
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("DELETE FROM HIST_CODIGO_BARRAS")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("DELETE FROM ABONOSP")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("DELETE FROM ABONOS")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("DELETE FROM PICK_CIEGO")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("DELETE FROM RUTA_SUPLENCIA")
|
||||
B4XPage_Appear
|
||||
l_rutasuplencia.Visible = False
|
||||
@@ -2281,7 +2377,7 @@ Sub resdia_Click
|
||||
SCROLL_RESDIA.Visible = True
|
||||
SCROLL_RESDIA.Panel.LoadLayout("RESDIA")
|
||||
SCROLL_RESDIA.Panel.Height = Panel4.Height
|
||||
Panel4.Visible = True
|
||||
Panel4.Visible = False
|
||||
|
||||
NUEVO.Visible =False
|
||||
BUSCA.Visible=False
|
||||
@@ -2653,7 +2749,7 @@ Sub B_OK_PANEL5_Click
|
||||
connecta.Visible=True
|
||||
Resumen.Visible= True
|
||||
P_RESUMEN.Visible=False
|
||||
Panel4.Visible = False
|
||||
Panel4.Visible=False
|
||||
SCROLL_RESDIA.Visible = False
|
||||
Btn_Ubicar.Visible=True
|
||||
p_principal.Visible = True
|
||||
@@ -2673,5 +2769,4 @@ Private Sub iv_abordo_Click
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("0"))
|
||||
B4XPages.MainPage.tipo_venta = "ABORDO"
|
||||
B4XPages.ShowPage("Productos")
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
Reference in New Issue
Block a user