mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 11:59:13 +00:00
- Se hicieron cambios en el codigo de boton mas y menos y textChanged de las cantidades de productos
This commit is contained in:
36
B4A/Subs.bas
36
B4A/Subs.bas
@@ -1573,6 +1573,7 @@ End Sub
|
||||
'Regresa el total del pedido en la tabla "PEDIDO" del cliente actual.
|
||||
Sub totalPedido As String
|
||||
Private cT As Cursor = Starter.skmt.ExecQuery($"select sum(PE_COSTO_TOT) as total from PEDIDO where PE_CLIENTE = '${traeCliente}'"$)
|
||||
Log($"select sum(PE_COSTO_TOT) as total from PEDIDO where PE_CLIENTE = '${traeCliente}'"$)
|
||||
Private pTotal As String = "0"
|
||||
If cT.RowCount > 0 Then
|
||||
cT.Position = 0
|
||||
@@ -1697,7 +1698,7 @@ Sub bitacora(fechab As String, usuariob As String, almacenb As String, rutab As
|
||||
Starter.skmt.ExecNonQuery($"INSERT INTO BITACORAGPS (fechab, usuariob , almacenb , rutab , eventob , clienteb , iniciob , finb , latitudb, longitudb , precision , motivonoventa , motivonovisita) VALUES ('${fechab}' ,'${usuariob}' , '${almacenb}' , '${rutab}' , '${eventob}' , '${clienteb}' , '${iniciob}' , '${finb}' , '${latitudb}' , '${longitudb}' , '${precision}' , '${motivonoventa}' , '${motivonovisita}')"$)
|
||||
Private cmd As DBCommand
|
||||
cmd.Initialize
|
||||
If eventob <> "Termina Venta" Then
|
||||
If eventob <> "Termina Venta" And eventob <> "No Venta" Then
|
||||
cmd.Name = "mandaBitacora3"
|
||||
Log("BITACORA3")
|
||||
Private nombreCliente As String = traeNombreCliente(clienteb)
|
||||
@@ -1713,12 +1714,20 @@ Sub bitacora(fechab As String, usuariob As String, almacenb As String, rutab As
|
||||
Private e As Cursor = Starter.skmt.ExecQuery($"select fechab from BITACORAGPS where usuariob = '${usuariob}' and almacenb = '${almacenb}' and rutab = '${rutab}' and clienteb = '${clienteb}' and eventob = 'Inicia Venta' order by fechab desc"$)
|
||||
If e.RowCount > 0 Then
|
||||
e.Position = 0
|
||||
Log("ACTUALIX¡ZA BITACORA")
|
||||
cmd.Name = "actualizaSalidaBitacora"
|
||||
' TMP_FINAL = to_date((?),'YYYY/MM/DD HH24:MI:ss') where TMP_RUTA = (?) and tmp_almacen = (?) and tmp_usuario = (?) and tmp_id_cliente = (?) and tmp_evento = (?) and tmp_fecha_movil = to_date((?),'YYYY/MM/DD HH24:MI:ss');
|
||||
cmd.Parameters = Array As Object(finb, rutab, almacenb, usuariob, clienteb, "Inicia Venta", e.GetString("fechab"))
|
||||
Log($"${finb}, ${rutab}, ${almacenb}, ${usuariob}, ${clienteb}, 'Inicia Venta', ${e.GetString("fechab")}, "$)
|
||||
Starter.reqManager.ExecuteCommand(cmd , "mandaBitacora")
|
||||
Log("ACTUALIZA BITACORA")
|
||||
If eventob = "Termina Venta" Then
|
||||
cmd.Name = "actualizaSalidaBitacora"
|
||||
' TMP_FINAL = to_date((?),'YYYY/MM/DD HH24:MI:ss') where TMP_RUTA = (?) and tmp_almacen = (?) and tmp_usuario = (?) and tmp_id_cliente = (?) and tmp_evento = (?) and tmp_fecha_movil = to_date((?),'YYYY/MM/DD HH24:MI:ss');
|
||||
cmd.Parameters = Array As Object(finb, rutab, almacenb, usuariob, clienteb, "Inicia Venta", e.GetString("fechab"))
|
||||
Log($"${finb}, ${rutab}, ${almacenb}, ${usuariob}, ${clienteb}, 'Inicia Venta', ${e.GetString("fechab")}, "$)
|
||||
Starter.reqManager.ExecuteCommand(cmd , "mandaBitacora")
|
||||
else if eventob = "No Venta" Then
|
||||
cmd.Name = "actualizaNoVentaBitacora"
|
||||
' TMP_FINAL = to_date((?),'YYYY/MM/DD HH24:MI:ss') where TMP_RUTA = (?) and tmp_almacen = (?) and tmp_usuario = (?) and tmp_id_cliente = (?) and tmp_evento = (?) and tmp_fecha_movil = to_date((?),'YYYY/MM/DD HH24:MI:ss');
|
||||
cmd.Parameters = Array As Object(finb, motivonoventa, motivonovisita, rutab, almacenb, usuariob, clienteb, "Inicia Venta", e.GetString("fechab"))
|
||||
Log($"${finb}, ${rutab}, ${almacenb}, ${usuariob}, ${clienteb}, 'Inicia Venta', ${e.GetString("fechab")}, "$)
|
||||
Starter.reqManager.ExecuteCommand(cmd , "mandaBitacora")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Log("Mandamos bitacora")
|
||||
@@ -1771,4 +1780,17 @@ Sub logJobDoneResultados(resultado As DBResult)
|
||||
LogColor(k & " = " & records(resultado.Columns.Get(k)), Colors.RGB(215,37,0))
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Sub traeinventario(id As String) As String
|
||||
Dim c As Cursor
|
||||
Dim inventario As String = "0"
|
||||
c=Starter.skmt.ExecQuery($"select CAT_GP_ALMACEN from ${traeTablaProds(Starter.tipov)} where CAT_GP_ID = '${id}'"$)
|
||||
' Log($"select CAT_GP_ALMACEN from ${Starter.tabla} where CAT_GP_NOMBRE = '${id}'"$)
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
inventario = c.GetString("CAT_GP_ALMACEN")
|
||||
End If
|
||||
c.Close
|
||||
Return inventario
|
||||
End Sub
|
||||
Reference in New Issue
Block a user