mirror of
https://github.com/KeymonSoft/Durakelo.git
synced 2026-04-17 19:36:12 +00:00
ultima sin encuestas
This commit is contained in:
23
B4A/Subs.bas
23
B4A/Subs.bas
@@ -1424,4 +1424,27 @@ Sub traeInventario(prodId As String, tipoVenta As String) As Int
|
||||
Else
|
||||
Return 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Borra los RMIs del pedido mayores que los productos del pedido y si borro RMIs regresa FALSE.
|
||||
Sub revisaRMIs(clienteId As String) As Boolean 'ignore
|
||||
Private validos As Boolean = True
|
||||
Private cr As Cursor = Starter.skmt.ExecQuery($"select sum(pe_cant) as cuantos from pedido where pe_cedis = 'DUR' and pe_cliente = '${clienteId}'"$)
|
||||
Private cp As Cursor = Starter.skmt.ExecQuery($"select sum(pe_cant) as cuantos from pedido where pe_cedis <> 'DUR' and pe_cliente = '${clienteId}'"$)
|
||||
cr.Position = 0
|
||||
cp.Position = 0
|
||||
Log($"${cr.GetInt("cuantos")} > ${cp.GetInt("cuantos")}"$)
|
||||
If cr.GetInt("cuantos") > cp.GetInt("cuantos") Then validos = False
|
||||
Log(validos)
|
||||
If validos = False Then
|
||||
Private x As Cursor = Starter.skmt.ExecQuery($"select * from pedido where pe_cliente = '${traeCliente}' and pe_cedis = 'DUR'"$)
|
||||
If x.RowCount > 0 Then
|
||||
For o = 0 To x.RowCount - 1
|
||||
x.Position = o
|
||||
Log(x.GetString("PE_PROID"))
|
||||
actualizaProducto("DUR", 0, 0, 0, x.GetString("PE_PRONOMBRE"), x.GetString("PE_PROID"), traeCliente, x.GetString("PE_FECHA"), x.GetString("PE_USUARIO"), "", 0, x.GetString("PE_TIPO"))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Return validos
|
||||
End Sub
|
||||
Reference in New Issue
Block a user