/**新销售订单变更单单据类型**/
-- 标准销售订单变更单
IF NOT EXISTS (SELECT 1 FROM t_bas_billtype WHERE FID = 1213726796512519168) 
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(1213726796512519168, 'sm_XSSalesOrder_STD_BT_S', 'sm_xssalorder', '1', ' ', 1, {ts'2018-08-08 18:08:00'}, 1, {ts'2018-08-08 18:08:00'}, '0', 1, '1', '0', ' ', '0', '1R9P+N4ZPKFU', NULL, 'C', '1', 1213726796512519168, NULL, ' ');

-- 服务销售订单变更单
IF NOT EXISTS (SELECT 1 FROM t_bas_billtype WHERE FID = 1213722833675379712) 
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(1213722833675379712, 'sm_XSSalesOrder_SERV_BT_S', 'sm_xssalorder', '0', ' ', 1, {ts'2018-08-08 18:08:00'}, 1, {ts'2018-08-08 18:08:00'}, '0', 1, '1', '0', ' ', '0', '1R9P+N4ZPKFU', NULL, 'C', '1', 1213722833675379712, NULL, ' ');

--t_bas_billtype_l
IF NOT EXISTS (SELECT 1 FROM t_bas_billtype_l WHERE FPKID = '1T1UMDC2836J')
INSERT INTO t_bas_billtype_l
(fpkid, fid, flocaleid, fname, fdescription)
VALUES('1T1UMDC2836J', 1213726796512519168, 'zh_CN', '标准销售订单变更单', ' ');

IF NOT EXISTS (SELECT 1 FROM t_bas_billtype_l WHERE FPKID = '1T1UMDC2836K')
INSERT INTO t_bas_billtype_l
(fpkid, fid, flocaleid, fname, fdescription)
VALUES('1T1UMDC2836K', 1213726796512519168, 'zh_TW', '標準銷售訂單變更單', ' ');

IF NOT EXISTS (SELECT 1 FROM t_bas_billtype_l WHERE FPKID = '1T1TWI51L3L1')
INSERT INTO t_bas_billtype_l
(fpkid, fid, flocaleid, fname, fdescription)
VALUES('1T1TWI51L3L1', 1213722833675379712, 'zh_CN', '服务销售订单变更单', ' ');

IF NOT EXISTS (SELECT 1 FROM t_bas_billtype_l WHERE FPKID = '1T1TWI557ISK')
INSERT INTO t_bas_billtype_l
(fpkid, fid, flocaleid, fname, fdescription)
VALUES('1T1TWI557ISK', 1213722833675379712, 'zh_TW', '服務銷售訂單變更單', ' ');

--t_bas_billtypeparameter
IF NOT EXISTS (SELECT 1 FROM t_bas_billtypeparameter WHERE FFORMID = 'sm_xssalorder' AND FBILLTYPEID = 1213726796512519168)
INSERT INTO t_bas_billtypeparameter
(fformid, fbilltypeid, fdata)
VALUES('sm_xssalorder', 1213726796512519168, '{"biztype":{"number":"210","masterid":422876630176775168,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04L7BOJGZ+RY","name":"物料类销售","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04L7BOJGZ+RZ","name":"物料類銷售","description":"","localeid":"zh_TW"}],"name":{"zh_TW":"物料類銷售","zh_CN":"物料类销售"},"id":422876630176775168},"_Type_":"sm_billtypeparam","biztype_id":422876630176775168}');

IF NOT EXISTS (SELECT 1 FROM t_bas_billtypeparameter WHERE FFORMID = 'sm_xssalorder' AND FBILLTYPEID = 1213722833675379712)
INSERT INTO t_bas_billtypeparameter
(fformid, fbilltypeid, fdata)
VALUES('sm_xssalorder', 1213722833675379712, '{"biztype":{"number":"212","masterid":691917066026067968,"_Type_":"bd_biztype","multilanguagetext":[{"_Type_":"locale","pkid":"04ZWPTGE397L","name":"服务类销售","description":"","localeid":"zh_CN"},{"_Type_":"locale","pkid":"04ZWPTGE397M","name":"服務類銷售","description":"","localeid":"zh_TW"}],"name":{"zh_TW":"服務類銷售","zh_CN":"服务类销售"},"id":691917066026067968},"_Type_":"sm_billtypeparam","biztype_id":691917066026067968,"bizcategory":"FW"}');


