-- 更新库存事务 450 为参与存货核算
update t_im_invschemes set fisforwardamount = 1 where fid = 1672370804282622976;

-- scm库执行以下数据["410 物料类销售请检"] 添加出入库方向、业务类型
DELETE FROM T_IM_INVTYPEENTRY WHERE FENTRYID = 1728311816280588288;
INSERT INTO T_IM_INVTYPEENTRY(FID,FENTRYID,FSEQ,FISDEFAULT,FKEEPERTYPE1,FINVTYPEISPRESET,FOWNERTYPE1,FINVTYPEID) VALUES (1576083779586372608,1728311816280588288,2,'0','bos_org','1','bd_supplier',688884312753630208); 
DELETE FROM T_IM_INVTYPEENTRY WHERE FENTRYID = 1728311816280588289;
INSERT INTO T_IM_INVTYPEENTRY(FID,FENTRYID,FSEQ,FISDEFAULT,FKEEPERTYPE1,FINVTYPEISPRESET,FOWNERTYPE1,FINVTYPEID) VALUES (1576083779586372608,1728311816280588289,3,'0','bd_customer','1','bos_org',688884427652393984); 

DELETE FROM T_IM_OUTINVTYPEENTRY WHERE FENTRYID = 1728311816280361984;
INSERT INTO T_IM_OUTINVTYPEENTRY(FOUTINVTYPEISPRESET,FID,FOUTKEEPERTYPE1,FOUTINVTYPEID,FENTRYID,FSEQ,FISDEFAULT,FOUTOWNERTYPE1) VALUES ('1',1576083779586372608,'bos_org',688884312753630208,1728311816280361984,2,'0','bd_supplier'); 
DELETE FROM T_IM_OUTINVTYPEENTRY WHERE FENTRYID = 1728311816280361985;
INSERT INTO T_IM_OUTINVTYPEENTRY(FOUTINVTYPEISPRESET,FID,FOUTKEEPERTYPE1,FOUTINVTYPEID,FENTRYID,FSEQ,FISDEFAULT,FOUTOWNERTYPE1) VALUES ('1',1576083779586372608,'bd_customer',688884427652393984,1728311816280361985,3,'0','bos_org'); 

DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1728311816280588290;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (1356397960253931520,1576083779586372608,1728311816280588290,'1',2,'0'); 
DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1728311816280588291;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (688860294365375488,1576083779586372608,1728311816280588291,'1',3,'0'); 

-- scm库执行以下数据["4101 物料类销售退货检验（更新库存）"] 添加入库方向、业务类型
DELETE FROM T_IM_INVTYPEENTRY WHERE FENTRYID = 1728325082486426624;
INSERT INTO T_IM_INVTYPEENTRY(FID,FENTRYID,FSEQ,FISDEFAULT,FKEEPERTYPE1,FINVTYPEISPRESET,FOWNERTYPE1,FINVTYPEID) VALUES (1576121557565168640,1728325082486426624,2,'0','bos_org','1','bd_supplier',688884312753630208); 

DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1728325433516343296;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (1356478361144132608,1576121557565168640,1728325433516343296,'1',2,'0');

-- scm库执行以下数据["113 普通采购收货待检入库"] 添加入库方向、业务类型
DELETE FROM T_IM_INVTYPEENTRY WHERE FENTRYID = 1728335623141703680;
INSERT INTO T_IM_INVTYPEENTRY(FID,FENTRYID,FSEQ,FISDEFAULT,FKEEPERTYPE1,FINVTYPEISPRESET,FOWNERTYPE1,FINVTYPEID) VALUES (688851045614516224,1728335623141703680,2,'0','bos_org','1','bd_supplier',688884312753630208); 

DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1728335623141477376;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (688852433954466816,688851045614516224,1728335623141477376,'1',2,'0'); 

-- scm库执行以下数据["3555 其他出库（不参与存货核算）"] 添加出库方向、业务类型
DELETE FROM T_IM_OUTINVTYPEENTRY WHERE FENTRYID = 1731783296041366528;
INSERT INTO T_IM_OUTINVTYPEENTRY(FOUTINVTYPEISPRESET,FID,FOUTKEEPERTYPE1,FOUTINVTYPEID,FENTRYID,FSEQ,FISDEFAULT,FOUTOWNERTYPE1) VALUES ('1',1702944797339203584,'bos_org',688884312753630208,1731783296041366528,2,'0','bd_supplier'); 
DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1731783296041410560;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (1356487117139607552,1702944797339203584,1731783296041410560,'1',2,'0');

-- scm库执行以下数据["440 物料类采购检验（更新库存）"] 添加出入库方向、业务类型
DELETE FROM T_IM_INVTYPEENTRY WHERE FENTRYID = 1731954382280445952;
INSERT INTO T_IM_INVTYPEENTRY(FID,FENTRYID,FSEQ,FISDEFAULT,FKEEPERTYPE1,FINVTYPEISPRESET,FOWNERTYPE1,FINVTYPEID) VALUES (1670325985754608640,1731954382280445952,2,'0','bos_org','1','bd_supplier',688884312753630208); 
DELETE FROM T_IM_OUTINVTYPEENTRY WHERE FENTRYID = 1731954382280569856;
INSERT INTO T_IM_OUTINVTYPEENTRY(FOUTINVTYPEISPRESET,FID,FOUTKEEPERTYPE1,FOUTINVTYPEID,FENTRYID,FSEQ,FISDEFAULT,FOUTOWNERTYPE1) VALUES ('1',1670325985754608640,'bos_org',688884312753630208,1731954382280569856,2,'0','bd_supplier'); 
DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1737055549700224000;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (1442618928659432448,1670325985754608640,1737055549700224000,'1',2,'0'); 
DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1737055549700224001;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (1002795213917594624,1670325985754608640,1737055549700224001,'1',3,'0'); 
DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1737055549700224002;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (966651870204521472,1670325985754608640,1737055549700224002,'1',4,'0'); 
DELETE FROM T_IM_BIZTYPEENTRY WHERE FENTRYID = 1737055549700224003;
INSERT INTO T_IM_BIZTYPEENTRY(FBIZTYPEID,FID,FENTRYID,FBIZTYPEISPRESET,FSEQ,FALLOWMANUALADD) VALUES (688852433954466816,1670325985754608640,1737055549700224003,'1',5,'0');

-- scm库执行以下数据["420 物料类销售退货质检出库（可用）"] 添加出库方向
DELETE FROM T_IM_OUTINVTYPEENTRY WHERE FENTRYID = 1753728991866628096;
INSERT INTO T_IM_OUTINVTYPEENTRY(FOUTINVTYPEISPRESET,FID,FOUTKEEPERTYPE1,FOUTINVTYPEID,FENTRYID,FSEQ,FISDEFAULT,FOUTOWNERTYPE1) VALUES ('1',1672381435694147584,'bos_org',688884312753630208,1753728991866628096,2,'0','bd_supplier'); 
