-- 新增领料出库的单据类型 2019-8-22
-- t_bas_billtype
IF NOT EXISTS (SELECT 1 FROM t_bas_billtype WHERE FID = 698250135813088256)
INSERT INTO t_bas_billtype (FID, FNUMBER, FBILLFORMID, FISDEFAULT, FBILLCODERULEID, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FCONTROLPRINTCOUNT, FMAXPRINTCOUNT, FPRINTAFTERAUDIT, FDOCUMENTSTATUS, FDEFPRINTTEMPLATE, FISSYSPRESET, FLAYOUTSOLUTION, FDEFWNREPORTTEMPLATE, FSTATUS, FENABLE, FMASTERID, FPARASETTINGXML, FBILLINITSETTING)
values (698250135813088256, 'im_MaterialReqOutBill_STD_BT_S', 'im_materialreqoutbill', '1', ' ', 1, {ts'2019-08-22 18:08:00'}, 1, {ts'2019-08-22 18:08:00'}, '0', '1', '1', '0', ' ', '0', '05NSWAY5DXRH', null, 'C', '1', '698250135813088256', ' ', ' ');

-- t_bas_billtype_l
IF NOT EXISTS (SELECT 1 FROM t_bas_billtype_l WHERE FPKID = '05R8/SDZY4QS')
INSERT INTO t_bas_billtype_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION) VALUES ('05R8/SDZY4QS', 698250135813088256, 'zh_CN', '标准领料出库单', ' ');
IF NOT EXISTS (SELECT 1 FROM t_bas_billtype_l WHERE FPKID = '05R8/SDZY4QT')
INSERT INTO t_bas_billtype_l (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION) VALUES ('05R8/SDZY4QT', 698250135813088256, 'zh_TW', '標準領料出庫單', ' ');

-- t_bas_billtypeparameter
IF NOT EXISTS (SELECT 1 FROM t_bas_billtypeparameter WHERE FBILLTYPEID = 698250135813088256)
insert into t_bas_billtypeparameter (FFORMID, FBILLTYPEID, FDATA)
values ('im_materialreqoutbill', 698250135813088256, '{"biztype":{"number":"320","masterid":688863581240093696,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L963HQBPS=","name":"普通领料","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04L963HQBPSA","name":"普通領料","description":"","localeid":"zh_TW"}],"name":{"zh_TW":"普通領料","zh_CN":"普通领料"},"id":688863581240093696},"_Type_":"im_billtypeparameter","biztype_id":688863581240093696}');


-- 新增生产入库单的单据类型
IF NOT EXISTS(SELECT 1 FROM t_bas_billtype WHERE FID = 697678838297318400)
INSERT INTO T_BAS_BILLTYPE (FID, FNUMBER, FBILLFORMID, FISDEFAULT, FBILLCODERULEID, FCREATORID, FCREATETIME, FMODIFIERID, FMODIFYTIME, FCONTROLPRINTCOUNT, FMAXPRINTCOUNT, FPRINTAFTERAUDIT, FDOCUMENTSTATUS, FDEFPRINTTEMPLATE, FISSYSPRESET, FLAYOUTSOLUTION, FDEFWNREPORTTEMPLATE, FSTATUS, FENABLE, FMASTERID, FPARASETTINGXML, FBILLINITSETTING)
 VALUES(697678838297318400, 'im_ProductInbill_STD_BT_S', 'im_productinbill', '1', ' ', 1,  {ts'2019-08-21 14:38:19'}, 1,  {ts'2019-08-23 16:48:15'}, '0', 1, '1', '0', ' ', '0', '05NX2PFLN+LI', NULL, 'C', '1', 697678838297318400, NULL, ' ');

IF NOT EXISTS(SELECT 1 FROM T_BAS_BILLTYPE_L WHERE FPKID='05OH9R0CZRPZ')
INSERT INTO T_BAS_BILLTYPE_L (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION) VALUES('05OH9R0CZRPZ', 697678838297318400, 'zh_CN', '生产入库单', '生产入库单');
IF NOT EXISTS(SELECT 1 FROM T_BAS_BILLTYPE_L WHERE FPKID='05OH9R0CZRQ+')
INSERT INTO T_BAS_BILLTYPE_L (FPKID, FID, FLOCALEID, FNAME, FDESCRIPTION) VALUES('05OH9R0CZRQ+', 697678838297318400, 'zh_TW', '生產入庫單', '生產入庫單');

IF NOT EXISTS(SELECT 1 FROM T_BAS_BILLTYPEPARAMETER WHERE  FBILLTYPEID=697678838297318400)
INSERT INTO T_BAS_BILLTYPEPARAMETER (FFORMID, FBILLTYPEID, FDATA) VALUES('im_productinbill', 697678838297318400, '{"biztype":{"number":"340","masterid":688864881516276736,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L9EL0EVJKK","name":"生產入庫","description":"","localeid":"zh_TW"},{"_Type_":"locale","pkid":"04L9EL0EVJKJ","name":"生产入库","description":"","localeid":"zh_CN"}],"name":{"zh_TW":"生產入庫","zh_CN":"生产入库"},"id":688864881516276736},"_Type_":"im_billtypeparameter","biztype_id":688864881516276736}');

