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

@@ -1037,6 +1037,20 @@ Sub b_mapa_Click
End Sub
Sub B_IMP_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)
Starter.skmt.Close : Log("Cerramos BD") : Starter.revisaBD
Subs.panelAnchoAlto(Panel_INV_A, Root.Width, Root.Height)
Panel_INV_A.Visible = True