mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
- Modificacion al codigo del boton ABORDO
This commit is contained in:
@@ -2522,58 +2522,52 @@ End Sub
|
||||
Sub B_PROXIMA_Click
|
||||
b = Starter.skmt.ExecQuery("Select count(*) as CUANTOS from pedido where pe_cliente = 0 and pe_tipo = 'ABORDO' " )
|
||||
b.Position = 0
|
||||
If b.GetString("CUANTOS") > 0 Then
|
||||
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
|
||||
Else If b.GetString("CUANTOS") = 0 Then
|
||||
e = Starter.skmt.ExecQuery("SELECT * FROM PEDIDO_SUGERIDO")
|
||||
If e.RowCount > 0 Then
|
||||
Msgbox2Async("Tienes un pedido sugerido, ¿Deseas aceptarlo?","Atención", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png"),False)
|
||||
Wait For Msgbox_Result (result As Int)
|
||||
If result = DialogResponse.POSITIVE Then
|
||||
If horaentrada Then
|
||||
For i = 0 To e.RowCount - 1
|
||||
e.Position = i
|
||||
c = Starter.skmt.ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",Array As String(e.GetString("ID_PRODUCTO")))
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
Subs.actualizaProducto(e.GetString("ALMACEN"), c.GetString("CAT_GP_PRECIO"),e.GetString("PROMEDIO"), c.GetString("CAT_GP_NOMBRE"), e.GetString("ID_PRODUCTO"),"0",Subs.traeFecha,usuario,e.GetString("RUTA"),c.GetString("CAT_GP_PRECIO"),"ABORDO")
|
||||
End If
|
||||
Next
|
||||
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
|
||||
Else If result = DialogResponse.NEGATIVE Then
|
||||
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 If
|
||||
Else If c.RowCount = 0 Then
|
||||
If horaentrada Then
|
||||
If horaentrada Then
|
||||
If b.GetString("CUANTOS") > 0 Then
|
||||
' 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
|
||||
Else If b.GetString("CUANTOS") = 0 Then
|
||||
e = Starter.skmt.ExecQuery("SELECT * FROM PEDIDO_SUGERIDO")
|
||||
If e.RowCount > 0 Then
|
||||
Msgbox2Async("Tienes un pedido sugerido, ¿Deseas aceptarlo?","Atención", "Si", "", "No",LoadBitmap(File.DirAssets,"alert2.png"),False)
|
||||
Wait For Msgbox_Result (result As Int)
|
||||
If result = DialogResponse.POSITIVE Then
|
||||
' If horaentrada Then
|
||||
For i = 0 To e.RowCount - 1
|
||||
e.Position = i
|
||||
c = Starter.skmt.ExecQuery2("SELECT * FROM CAT_GUNAPROD WHERE CAT_GP_ID = ?",Array As String(e.GetString("ID_PRODUCTO")))
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
Subs.actualizaProducto(e.GetString("ALMACEN"), c.GetString("CAT_GP_PRECIO"),e.GetString("PROMEDIO"), c.GetString("CAT_GP_NOMBRE"), e.GetString("ID_PRODUCTO"),"0",Subs.traeFecha,usuario,e.GetString("RUTA"),c.GetString("CAT_GP_PRECIO"),"ABORDO")
|
||||
End If
|
||||
Next
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object("0"))
|
||||
Starter.tipov = "ABORDO"
|
||||
B4XPages.ShowPage("Productos")
|
||||
' End If
|
||||
Else If result = DialogResponse.NEGATIVE Then
|
||||
' 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")
|
||||
' End If
|
||||
End If
|
||||
Else If c.RowCount = 0 Then
|
||||
' 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")
|
||||
' End If
|
||||
End If
|
||||
e.Close
|
||||
End If
|
||||
e.Close
|
||||
End If
|
||||
b.Close
|
||||
End Sub
|
||||
@@ -2607,7 +2601,7 @@ Sub horaentrada As Boolean
|
||||
' End If
|
||||
DateTime.TimeFormat = "HH:mm:ss"
|
||||
Private lasDoce As Long = DateTime.TimeParse("12:00:00")
|
||||
' Private lasDoce As Long = DateTime.TimeParse("17:41:00")
|
||||
Private lasDoce As Long = DateTime.TimeParse("17:55:00")
|
||||
Log("lasDoce: " & DateUtils.TicksToString(lasDoce))
|
||||
If DateTime.Now < lasDoce Then
|
||||
ToastMessageShow($"No puedes entrar al ABORDO antes de las ${Subs.horaNormal(lasDoce)}"$, True)
|
||||
|
||||
@@ -88,6 +88,6 @@ ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Cliente,B_IMP2_Click,1088,6,C_Principal,B4XPage_CloseRequest,1963,0,C_Principal,B_OK_RES_Click,2341,0,B4XMainPage,Class_Globals,23,0,Visual Designer,principal.bal,-100,1,C_Principal,Class_Globals,0,0,C_Principal,B_PROXIMA_Click,2533,6,C_Principal,horaentrada,2603,6,Subs,fechanormal,1661,0,Subs,horaNormal,1662,2
|
||||
NavigationStack=C_Principal,horaentrada,2602,6,Subs,fechanormal,1661,0,Subs,horaNormal,1662,2,C_Cliente,B_IMP2_Click,1088,6,C_Principal,B4XPage_CloseRequest,1963,0,C_Principal,B_OK_RES_Click,2341,0,B4XMainPage,Class_Globals,23,0,Visual Designer,principal.bal,-100,1,C_Principal,Class_Globals,1,0,C_Principal,B_PROXIMA_Click,2559,6
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,27,11,3,12,4,28,17,23,29
|
||||
|
||||
Reference in New Issue
Block a user