05-10-2025, 11:22 AM
Ve a SISTEMA->MANTENIMIENTO->Pestaña CONSOLA DB y ejecuta estos 3 scripts (uno a uno):
create table almacen_complementg2 select * from almacen_complementg;
insert into almacen_complementg (id_centro,id_empresa,id_almacen,id_tipo_comg,id_complementog,cantidad,stock_minimo,complementog,variacion,desc_variacion)
select "01","001","19",id_tipo_comg,id_complementog,0,0,complementog,0,"" from complementog where cafeteria = "S" and id_complementog not in (select id_complementog from almacen_complementg2);
drop table almacen_complementg2;
ya me dices.
create table almacen_complementg2 select * from almacen_complementg;
insert into almacen_complementg (id_centro,id_empresa,id_almacen,id_tipo_comg,id_complementog,cantidad,stock_minimo,complementog,variacion,desc_variacion)
select "01","001","19",id_tipo_comg,id_complementog,0,0,complementog,0,"" from complementog where cafeteria = "S" and id_complementog not in (select id_complementog from almacen_complementg2);
drop table almacen_complementg2;
ya me dices.