cambio de borrado

This commit is contained in:
cvaldes1201
2024-09-19 13:09:38 -06:00
parent 11419cdc97
commit 08f0c5a27b
5 changed files with 64 additions and 17 deletions

View File

@@ -471,22 +471,22 @@ Sub B4XPage_Appear
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"))
' 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
' Buscamos los clientes que tienen pedido y NO estan impresos.
Private t As Cursor = Starter.skmt.ExecQuery("Select cat_cl_codigo from kmt_info where impresion = 0 and cat_cl_codigo not in (select ci_cuenta from cliente_impreso) and cat_cl_codigo in (select distinct pe_cliente from pedido)")
If t.RowCount > 0 Then
For i = 0 To t.RowCount - 1
t.Position = i ' Y los BORRAMOS.
Log(t.GetString("CAT_CL_CODIGO"))
Starter.skmt.ExecNonQuery($"update CUENTAA set CUENTA = '${t.GetString("CAT_CL_CODIGO")}'"$)
Subs.borraPedidoClienteActual
Msgbox2Async($"El pedido del cliente ${t.GetString("CAT_CL_CODIGO")} no está impreso, se va a borrar"$, "PEDIDO NO IMPRESO", "Aceptar", "", "", Null, True)
Next
End If
' ' Buscamos los clientes que tienen pedido y NO estan impresos.
' Private t As Cursor = Starter.skmt.ExecQuery("Select cat_cl_codigo from kmt_info where impresion = 0 and cat_cl_codigo not in (select ci_cuenta from cliente_impreso) and cat_cl_codigo in (select distinct pe_cliente from pedido)")
' If t.RowCount > 0 Then
' For i = 0 To t.RowCount - 1
' t.Position = i ' Y los BORRAMOS.
' Log(t.GetString("CAT_CL_CODIGO"))
' Starter.skmt.ExecNonQuery($"update CUENTAA set CUENTA = '${t.GetString("CAT_CL_CODIGO")}'"$)
' Subs.borraPedidoClienteActual
' Msgbox2Async($"El pedido del cliente ${t.GetString("CAT_CL_CODIGO")} no está impreso, se va a borrar"$, "PEDIDO NO IMPRESO", "Aceptar", "", "", Null, True)
' Next
' End If
' Log("Check phone state: " & rp.Check(rp.PERMISSION_READ_PHONE_STATE))
' Log("Pedimos permisos de estado del cel")
@@ -551,6 +551,21 @@ Sub trabajar_Click
End Sub
Sub Subir_Click
' Buscamos los clientes que tienen pedido y NO estan impresos.
Private t As Cursor = Starter.skmt.ExecQuery("Select cat_cl_codigo from kmt_info where impresion = 0 and cat_cl_codigo not in (select ci_cuenta from cliente_impreso) and cat_cl_codigo in (select distinct pe_cliente from pedido)")
If t.RowCount > 0 Then
For i = 0 To t.RowCount - 1
t.Position = i ' Y los BORRAMOS.
Log(t.GetString("CAT_CL_CODIGO"))
Starter.skmt.ExecNonQuery($"update CUENTAA set CUENTA = '${t.GetString("CAT_CL_CODIGO")}'"$)
Subs.borraPedidoClienteActual
' Msgbox2Async($"El pedido del cliente ${t.GetString("CAT_CL_CODIGO")} no está impreso, se va a borrar"$, "PEDIDO NO IMPRESO", "Aceptar", "", "", Null, True)
Next
End If
Sleep(1000)
CARGA = "SUBIR"
' P1.Visible = True
trabajar.Visible = False