/** 发票类型 **/
DELETE FROM t_er_invoicetype WHERE FID = 1454411568673828864;
IF NOT EXISTS (SELECT 1 FROM t_er_invoicetype where fnumber = '28')
INSERT INTO t_er_invoicetype(FID,FISEINVOICE,FISVATINVOICE,FISDEFAULT,FMASTERID,FSTATUS,FUDRDISPLAY,FJS,FNUMBER,FCREATETIME,FUSERDEFINERULE,FMODIFIERID,FENABLE,FISSPECIALINVOICE,FREMARK,FMODIFYTIME,FISOFFSET,FISTRANSPORTINVOICE,FCREATORID) VALUES (1454411568673828864,'1','0','1',1454411568673828864,'C','旅客 不为空  或者 身份证 不为空  ','passengername != '''' ||idcard != '''' ','28',{ts'2022-06-30  00:00:00'},'{"filterRow":[{"id":"2JMYH1O+P4KG","leftBracket":"","compareType":"9","fieldName":"passengername","rightBracket":"","logic":"1","value":[{"id":"2JMYH1O+P58Q","value":""}],"baseDataIds":[]},{"id":"2JMYH1O+P4KH","leftBracket":"","compareType":"9","fieldName":"idcard","rightBracket":"","logic":"0","value":[{"id":"2JMYH1O+P58R","value":""}],"baseDataIds":[]}],"forList":false}',1236081998485809152,'1','0',' ',{ts'2022-06-30  00:00:00'},'1','1',1236081998485809152);
DELETE FROM t_er_invoicetype WHERE FID = 1454412199111273472;
IF NOT EXISTS (SELECT 1 FROM t_er_invoicetype where fnumber = '29')
INSERT INTO t_er_invoicetype(FID,FISEINVOICE,FISVATINVOICE,FISDEFAULT,FMASTERID,FSTATUS,FUDRDISPLAY,FJS,FNUMBER,FCREATETIME,FUSERDEFINERULE,FMODIFIERID,FENABLE,FISSPECIALINVOICE,FREMARK,FMODIFYTIME,FISOFFSET,FISTRANSPORTINVOICE,FCREATORID) VALUES (1454412199111273472,'1','0','1',1454412199111273472,'C','旅客 不为空  或者 身份证 不为空  ','passengername != '''' ||idcard != '''' ','29',{ts'2022-06-30  00:00:00'},'{"filterRow":[{"id":"2JMYN25KUA3U","leftBracket":"","compareType":"9","fieldName":"passengername","rightBracket":"","logic":"1","value":[{"id":"2JMYN25KU=FK","value":""}],"baseDataIds":[]},{"id":"2JMYN25KUA3V","leftBracket":"","compareType":"9","fieldName":"idcard","rightBracket":"","logic":"0","value":[{"id":"2JMYN25KU=FL","value":""}],"baseDataIds":[]}],"forList":false}',1236081998485809152,'1','0',' ',{ts'2022-06-30  00:00:00'},'1','1',1236081998485809152);

/** 发票类型-多语言 **/
DELETE FROM t_er_invoicetype_l WHERE FPKID = '2JMYJ7I/U+SW';
if exists (select 1 FROM t_er_invoicetype WHERE FID = 1454411568673828864)
INSERT INTO t_er_invoicetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454411568673828864,'2JMYJ7I/U+SW','zh_CN','电子航空客票');

DELETE FROM t_er_invoicetype_l WHERE FPKID = '2JMYJ7I/U+SX';
if exists (select 1 FROM t_er_invoicetype WHERE FID = 1454411568673828864)
INSERT INTO t_er_invoicetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454411568673828864,'2JMYJ7I/U+SX','zh_TW','電子航空客票');

DELETE FROM t_er_invoicetype_l WHERE FPKID = '2JMYNTJ27JOX';
if exists (select 1 FROM t_er_invoicetype WHERE FID = 1454412199111273472)
INSERT INTO t_er_invoicetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454412199111273472,'2JMYNTJ27JOX','zh_CN','电子铁路客票');

DELETE FROM t_er_invoicetype_l WHERE FPKID = '2JMYNTJ27JOY';
if exists (select 1 FROM t_er_invoicetype WHERE FID = 1454412199111273472)
INSERT INTO t_er_invoicetype_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454412199111273472,'2JMYNTJ27JOY','zh_TW','電子鐵路客票');

/** 发票合并规则 **/
DELETE FROM t_er_invoicemergerule WHERE FID = 1454434154698877952;
IF NOT EXISTS (SELECT 1 FROM t_er_invoicetype where fnumber = 'FPHBGZ028')
INSERT INTO t_er_invoicemergerule(FINVOICEDATEDETAILEQUAL,FGOODCODEEQUAL,FINVOICEDATEEQUAL,FMASTERID,FUDRDISPLAY,FTAXRATEEQUAL,FJS,FISMERGE,FOFFSETEQUAL,FCREATETIME,FENABLE,FINVOICETYPE,FORDER,FGOODNAMEEQUAL,FTAXNUMEQUAL,FID,FFROMEQUAL,FSTATUS,FBUYERNAMEEQUAL,FTOEQUAL,FSALERNAMEEQUAL,FNUMBER,FUSERDEFINERULE,FMODIFIERID,FPASSENGEREQUAL,FMODIFYTIME,FMERGETYPE,FITEMEQUAL,FAMOUNTEQUAL,FCREATORID) VALUES ('0','0','0',1454434154698877952,' ','0',' ','1','1',{ts'2022-06-30  00:00:00'},'1','28',0,'0','0',1454434154698877952,'0','A','0','0','0','FPHBGZ028',' ',1236081998485809152,'1',{ts'2022-06-30  00:00:00'},'3','0','0',1236081998485809152);
DELETE FROM t_er_invoicemergerule WHERE FID = 1454434520509296640;
IF NOT EXISTS (SELECT 1 FROM t_er_invoicetype where fnumber = 'FPHBGZ029')
INSERT INTO t_er_invoicemergerule(FINVOICEDATEDETAILEQUAL,FGOODCODEEQUAL,FINVOICEDATEEQUAL,FMASTERID,FUDRDISPLAY,FTAXRATEEQUAL,FJS,FISMERGE,FOFFSETEQUAL,FCREATETIME,FENABLE,FINVOICETYPE,FORDER,FGOODNAMEEQUAL,FTAXNUMEQUAL,FID,FFROMEQUAL,FSTATUS,FBUYERNAMEEQUAL,FTOEQUAL,FSALERNAMEEQUAL,FNUMBER,FUSERDEFINERULE,FMODIFIERID,FPASSENGEREQUAL,FMODIFYTIME,FMERGETYPE,FITEMEQUAL,FAMOUNTEQUAL,FCREATORID) VALUES ('0','0','0',1454434520509296640,' ','0',' ','1','1',{ts'2022-06-30  00:00:00'},'1','29',0,'0','0',1454434520509296640,'0','A','0','0','0','FPHBGZ029',' ',1236081998485809152,'1',{ts'2022-06-30  00:00:00'},'3','0','0',1236081998485809152);

/** 发票合并规则-多语言 **/
DELETE FROM t_er_invoicemergerule_l WHERE FPKID = '2JN0RT5SSUV=';
if exists (select 1 FROM t_er_invoicemergerule WHERE FID = 1454434154698877952)
INSERT INTO t_er_invoicemergerule_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454434154698877952,'2JN0RT5SSUV=','zh_CN','电子航空客票');

DELETE FROM t_er_invoicemergerule_l WHERE FPKID = '2JN0RT5SSUVA';
if exists (select 1 FROM t_er_invoicemergerule WHERE FID = 1454434154698877952)
INSERT INTO t_er_invoicemergerule_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454434154698877952,'2JN0RT5SSUVA','zh_TW','電子航空客票');

DELETE FROM t_er_invoicemergerule_l WHERE FPKID = '2JN0UG3AGIR+';
if exists (select 1 FROM t_er_invoicemergerule WHERE FID = 1454434520509296640)
INSERT INTO t_er_invoicemergerule_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454434520509296640,'2JN0UG3AGIR+','zh_CN','电子铁路客票');

DELETE FROM t_er_invoicemergerule_l WHERE FPKID = '2JN0UG3AGIR/';
if exists (select 1 FROM t_er_invoicemergerule WHERE FID = 1454434520509296640)
INSERT INTO t_er_invoicemergerule_l(FID,FPKID,FLOCALEID,FNAME) VALUES (1454434520509296640,'2JN0UG3AGIR/','zh_TW','電子鐵路客票');
