14-07-2022, 10:25 AM
Pruebas ahora este script, pero primero HAZ UNA COPIA DE SEGURIDAD por si acaso
delete from ventadir_comg where id_venta in (select id_venta from ventadirecta where cerrada = "S" and fecha_venta = "2022-07-12" and id_tiquet is null) and serie = "F" and id_factura is null and cantidad < 0;
Si algo va mal restaura la copia y buscamos otra alternativa.
delete from ventadir_comg where id_venta in (select id_venta from ventadirecta where cerrada = "S" and fecha_venta = "2022-07-12" and id_tiquet is null) and serie = "F" and id_factura is null and cantidad < 0;
Si algo va mal restaura la copia y buscamos otra alternativa.