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

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

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

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