/* 费用类单据增加单据类型字段 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_APPLYPROJECTBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
 ALTER TABLE T_ER_APPLYPROJECTBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_COSTESTIMATEBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
 ALTER TABLE T_ER_COSTESTIMATEBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );

--IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
-- ALTER TABLE T_ER_DAILYAPPLYBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );
--IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REPAYMENTBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
-- ALTER TABLE T_ER_REPAYMENTBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );
--IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHAREBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
-- ALTER TABLE T_ER_EXPENSESHAREBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );
--IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYLOANBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
-- ALTER TABLE T_ER_DAILYLOANBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_WITHHOLDINGBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
 ALTER TABLE T_ER_WITHHOLDINGBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );

--IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYREIMBURSEBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
-- ALTER TABLE T_ER_DAILYREIMBURSEBILL ADD (FSTDBILLTYPE BIGINT DEFAULT 0 NOT NULL );
--
-- IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE')
-- ALTER TABLE T_ER_PUBREIMBILL ADD (FSTDBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );