/*费用报销*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYREIMBURSEBILL' AND KSQL_COL_NAME ='FWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_DAILYREIMBURSEBILL ADD (FWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL' AND KSQL_COL_NAME ='FEXPORIWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_EXPENSEDETAIL ADD (FEXPORIWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL' AND KSQL_COL_NAME ='FEXPWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_EXPENSEDETAIL ADD (FEXPWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/*差旅报销*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEBILL' AND KSQL_COL_NAME ='FWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_REIMBURSEBILL ADD (FWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSETRIPENTRY' AND KSQL_COL_NAME ='FEXPORIWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_REIMBURSETRIPENTRY ADD (FEXPORIWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSETRIPENTRY' AND KSQL_COL_NAME ='FEXPWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_REIMBURSETRIPENTRY ADD (FEXPWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/*对公费用*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_PUBREIMBILL ADD (FWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FEXPORIWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_PUBREIMEXPDET ADD (FEXPORIWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FEXPWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_PUBREIMEXPDET ADD (FEXPWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/*费用申请*/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYBILL' AND KSQL_COL_NAME ='FWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_DAILYAPPLYBILL ADD (FWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FEXPORIWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FEXPORIWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYDETAIL' AND KSQL_COL_NAME ='FEXPWITHHOLDINGAMOUNT')
ALTER TABLE T_ER_DAILYAPPLYDETAIL ADD (FEXPWITHHOLDINGAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/* 费用预提分录增加字段 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_WITHHOLDINGENTRY' AND KSQL_COL_NAME ='FTRIPITEM')
ALTER TABLE T_ER_WITHHOLDINGENTRY ADD (FTRIPITEM BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_WITHHOLDINGENTRY' AND KSQL_COL_NAME ='FISVACTAX')
ALTER TABLE T_ER_WITHHOLDINGENTRY ADD (FISVACTAX CHAR(1) DEFAULT '0' NOT NULL );

