IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_REIMBURSEBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYREIMBURSEBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_DAILYREIMBURSEBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_PUBREIMBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);
-- add new
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYAPPLYBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_DAILYAPPLYBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REQBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_REQBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYLOANBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_DAILYLOANBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_APPLYPROJECTBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_APPLYPROJECTBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PREPAYBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_PREPAYBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_CONTRACTBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_CONTRACTBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REPAYMENTBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_REPAYMENTBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_WITHHOLDINGBILL' AND KSQL_COL_NAME ='FNEEDUPLOADINVOICE')
ALTER TABLE T_ER_WITHHOLDINGBILL ADD (FNEEDUPLOADINVOICE CHAR(1) DEFAULT '0' NOT NULL);