-Se agregó que al entrar a Principal, si hay abordo y NO está impreso, se borre!!

This commit is contained in:
2024-05-02 15:46:15 -06:00
parent 0bb30c9f28
commit a5b4a27836
2 changed files with 16 additions and 1 deletions

View File

@@ -424,6 +424,21 @@ Sub B4XPage_Appear
c.Close
' Subs.guardaUltimaActividadBD("principal")
' Revisamos si hay abordo y si SI hay y no esta impreso, lo borramos.
Private imp As ResultSet = Starter.skmt.ExecQuery("select IMPRESION from kmt_info where CAT_CL_CODIGO = '0'") 'Revisamos si el cliente 0 esta impreso.
Private abordoImpreso As Boolean = False
Do While imp.NextRow
If imp.GetString("IMPRESION") = 1 Then abordoImpreso = True '
Loop
Private ab As ResultSet = Starter.skmt.ExecQuery("select * from PEDIDO where PE_CLIENTE = '0'")
Do While ab.NextRow
If Not(abordoImpreso) Then
LogColor("BORRAMOS PEDIDO DE ABORDO PORQUE NO ESTA IMPRESO", Colors.red)
' Starter.skmt.ExecNonQuery("delete from PEDIDO where PE_CLIENTE = '0'") 'Borramos el abordo si no esta impreso.
Subs.actualizaProducto(ALMACEN, 0, 0, ab.GetString("PE_PRONOMBRE"), ab.GetString("PE_PROID"), ab.GetString("PE_CLIENTE"), Subs.traeFecha, Subs.traeUsuarioDeBD, ab.GetString("PE_RUTA"), 0, ab.GetString("PE_TIPO"))
End If
Loop
' Log("Check phone state: " & rp.Check(rp.PERMISSION_READ_PHONE_STATE))
' Log("Pedimos permisos de estado del cel")