-- 商旅付款申请单单头增加智能发票报销字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CHECKINGPAY' AND KSQL_COL_NAME ='FAUTOMAPINVOICE')
ALTER TABLE T_ER_CHECKINGPAY ADD (FAUTOMAPINVOICE CHAR(1) DEFAULT '0' NOT NULL );

-- 商旅付款申请单发票信息增加状态字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEINFOCP' AND KSQL_COL_NAME ='FTICKETCHANGES')
ALTER TABLE T_ER_INVOICEINFOCP ADD (FTICKETCHANGES CHAR(1) DEFAULT ' ' NOT NULL );