/*  借款单、费用报销单、差旅报销单、对公报销单、出差申请单、还款单、预付单、付款申请单、费用预提单、费用分摊单、暂估单增加记账日期 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYLOANBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_DAILYLOANBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_DAILYREIMBURSEBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_DAILYREIMBURSEBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_REIMBURSEBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_PUBREIMBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REQBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_REQBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REPAYMENTBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_REPAYMENTBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PREPAYBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_PREPAYBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_APPLYPAYBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_APPLYPAYBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_WITHHOLDINGBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_WITHHOLDINGBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSESHAREBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_EXPENSESHAREBILL ADD (FBOOKEDDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_COSTESTIMATEBILL' AND KSQL_COL_NAME ='FBOOKEDDATE')
ALTER TABLE T_ER_COSTESTIMATEBILL ADD (FBOOKEDDATE DATETIME);

