-- 历史数据升级：库存事务的入库库存类型、出库库存类型只要有一个库存类型的“参与存货核算”的标识是打勾的，库存事务就升级为”参与存货核算“勾选；反之，则不勾选。
update T_IM_INVSCHEMES a set fisforwardamount = '0'
where
not exists (select 1 from T_IM_INVTYPEENTRY b where b.FINVTYPEID IN (688884427652393984,688884593092520960,688884005529250816) and a.fid = b.fid)
and
not exists (select 1 from T_IM_OUTINVTYPEENTRY b where b.FOUTINVTYPEID IN (688884427652393984,688884593092520960,688884005529250816) and a.fid = b.fid);
