-- 发票导入操作配置（一键报销）
-- 业务事项
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEPGINFO' AND KSQL_COL_NAME ='FBIZITEM')
ALTER TABLE T_ER_INVOICEPGINFO ADD (FBIZITEM BIGINT DEFAULT 0 NOT NULL );

-- 单据类型
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEPGINFO' AND KSQL_COL_NAME ='FBILLGROUP')
ALTER TABLE T_ER_INVOICEPGINFO ADD (FBILLGROUP BIGINT DEFAULT 0 NOT NULL );

-- 默认
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEPGINFO' AND KSQL_COL_NAME ='FISDEFAULT')
ALTER TABLE T_ER_INVOICEPGINFO ADD (FISDEFAULT CHAR(1) DEFAULT '0' NOT NULL );


-- 报销流程服务插件配置
-- 单据类型
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMSERVICEPG' AND KSQL_COL_NAME ='FBILLGROUP')
ALTER TABLE T_ER_REIMSERVICEPG ADD (FBILLGROUP BIGINT DEFAULT 0 NOT NULL );

-- 业务事项
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMSERVICEPG' AND KSQL_COL_NAME ='FBIZITEM')
ALTER TABLE T_ER_REIMSERVICEPG ADD (FBIZITEM BIGINT DEFAULT 0 NOT NULL );