/*差旅报销 摊销明细分录, 增加核定税额字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_TRIPRESHAREDETAIL' AND KSQL_COL_NAME IN ('FAPPROVETAX'))
ALTER TABLE T_ER_TRIPRESHAREDETAIL ADD (FAPPROVETAX DECIMAL(23,10) DEFAULT 0 NOT NULL );

/*对公报销 摊销明细分录, 增加核定税额字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBLICRESHAREDETAIL' AND KSQL_COL_NAME IN ('FAPPROVETAX'))
ALTER TABLE T_ER_PUBLICRESHAREDETAIL ADD (FAPPROVETAX DECIMAL(23,10) DEFAULT 0 NOT NULL );

/*费用报销 摊销明细分录, 增加核定税额字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYRESHAREDETAIL' AND KSQL_COL_NAME IN ('FAPPROVETAX'))
ALTER TABLE T_ER_DAILYRESHAREDETAIL ADD (FAPPROVETAX DECIMAL(23,10) DEFAULT 0 NOT NULL );

/*费用分摊 待摊明细分录, 增加核定税额字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHAREWAIT' AND KSQL_COL_NAME IN ('FAPPROVETAX'))
ALTER TABLE T_ER_EXPENSESHAREWAIT ADD (FAPPROVETAX DECIMAL(23,10) DEFAULT 0 NOT NULL );

/*费用分摊 摊销明细分录, 增加核定税额字段*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHAREDETAIL' AND KSQL_COL_NAME IN ('FAPPROVETAX'))
ALTER TABLE T_ER_EXPENSESHAREDETAIL ADD (FAPPROVETAX DECIMAL(23,10) DEFAULT 0 NOT NULL );