mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 20:09:13 +00:00
- Pedido sugerido
- ABordo habiitado despues de las 12:00 - Parcial de proyecto GPS
This commit is contained in:
@@ -289,7 +289,6 @@ End Sub
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
|
||||
Sub B4XPage_Appear
|
||||
Log(Subs.traeDiaSemana)
|
||||
StartBluetooth
|
||||
' 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)
|
||||
@@ -676,6 +675,11 @@ Sub cargar_Click
|
||||
cmd.Name = "select_cat_paquetes_KELL"
|
||||
cmd.Parameters = Array As Object(ALMACEN)
|
||||
reqManager.ExecuteQuery(cmd , 0, "gunaprodp")
|
||||
|
||||
cmd.Initialize
|
||||
cmd.Name = "pedidosugerido_KELLOGGS"
|
||||
cmd.Parameters = Array As Object(ALMACEN, e_ruta.Text)
|
||||
reqManager.ExecuteQuery(cmd , 0, "PEDIDOsugerido")
|
||||
|
||||
cmd.Initialize
|
||||
cmd.Name = "select_cat_paquetess_KELL"
|
||||
@@ -1026,6 +1030,25 @@ Sub JobDone(Job As HttpJob)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If Job.JobName = "DBRequest" Then
|
||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||
If RESULT.Tag = "PEDIDOsugerido" Then 'query tag
|
||||
|
||||
For Each records() As Object In RESULT.Rows
|
||||
Dim ID_PRODUCTO As String = records(RESULT.Columns.Get("ID_PRODUCTO"))
|
||||
Dim CANTIDAD As String = records(RESULT.Columns.Get("PROMEDIO"))
|
||||
|
||||
c = Starter.skmt.ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",Array As String(ID_PRODUCTO))
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
Subs.actualizaProducto(ALMACEN, c.GetString("CAT_GP_PRECIO"),CANTIDAD, c.GetString("CAT_GP_NOMBRE"), ID_PRODUCTO,"0",Subs.traeFecha,usuario,e_ruta.Text,c.GetString("CAT_GP_PRECIO"),"ABORDO")
|
||||
End If
|
||||
' Starter.skmt.ExecNonQuery2("INSERT INTO PEDIDO(PE_TIPO, PE_RUTA, PE_CEDIS, PE_CANT,PE_PROID,PE_CLIENTE, PE_USUARIO) VALUES (?,?,?,?,?,?,?)", Array As Object ("ABORDO", e_ruta.Text, ALMACEN, CANTIDAD, ID_PRODUCTO, "0", usuario))
|
||||
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If Job.JobName = "DBRequest" Then
|
||||
Dim RESULT As DBResult = reqManager.HandleJob(Job)
|
||||
@@ -1618,7 +1641,6 @@ Sub JobDone(Job As HttpJob)
|
||||
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))
|
||||
Log("GUARDAMOS FECHA EN CAT_VARIABLES")
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
@@ -2454,10 +2476,50 @@ Sub Resumen_Click
|
||||
End Sub
|
||||
|
||||
Sub B_PROXIMA_Click
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("0"))
|
||||
Starter.tipov = "ABORDO"
|
||||
B4XPages.ShowPage("Productos")
|
||||
If horaentrada Then
|
||||
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("0"))
|
||||
Starter.tipov = "ABORDO"
|
||||
B4XPages.ShowPage("Productos")
|
||||
|
||||
Else
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub horaentrada As Boolean
|
||||
|
||||
Dim periodo As Period
|
||||
periodo.Hours = 0
|
||||
periodo.Minutes = 0
|
||||
Dim newDate As Long = DateUtils.AddPeriod(DateTime.Now, periodo)
|
||||
Log(newDate)
|
||||
Log(DateUtils.TicksToString(newDate))
|
||||
|
||||
Dim p2 As Period
|
||||
p2.Hours = 0
|
||||
p2.Minutes = 20
|
||||
DateTime.DateFormat = "MM/dd/yyyy HH:mm"
|
||||
Dim fecha2 As String = DateTime.Date(DateTime.Now)
|
||||
Dim prueba2() As String = Regex.Split(" ",fecha2)
|
||||
LogColor(prueba2(0),Colors.red)
|
||||
Dim prueba3 As String = prueba2(0) &" "&"12:00"
|
||||
LogColor(prueba3,Colors.Red)
|
||||
Dim ticks2 As Long = DateTime.DateParse(prueba3)
|
||||
LogColor(ticks2,Colors.red)
|
||||
LogColor(DateTime.Date(ticks2),Colors.red)
|
||||
Dim timeToCheck2 As Long = DateUtils.AddPeriod(ticks2, p2)
|
||||
LogColor(DateUtils.TicksToString(timeToCheck2),Colors.red)
|
||||
|
||||
If timeToCheck2 <= newDate Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Sub Printer_Connected (Success As Boolean)
|
||||
|
||||
Reference in New Issue
Block a user