/*发票合并规则 合并条件, 增加出发地相同字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEMERGERULE' AND KSQL_COL_NAME ='FFROMEQUAL')
ALTER TABLE T_ER_INVOICEMERGERULE ADD (FFROMEQUAL CHAR(1) DEFAULT '0' NOT NULL );

/*发票合并规则 合并条件, 增加目的地相同字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEMERGERULE' AND KSQL_COL_NAME ='FTOEQUAL')
ALTER TABLE T_ER_INVOICEMERGERULE ADD (FTOEQUAL CHAR(1) DEFAULT '0' NOT NULL );

/*发票合并规则 合并条件, 增加金额相同字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEMERGERULE' AND KSQL_COL_NAME ='FAMOUNTEQUAL')
ALTER TABLE T_ER_INVOICEMERGERULE ADD (FAMOUNTEQUAL CHAR(1) DEFAULT '0' NOT NULL );

