-- 是否需要影像扫描、是否启用发票云、是否与发票云交互
-- 还款单
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_repaymentbill' AND KSQL_COL_NAME ='FNEEDIMAGESCAN')
ALTER TABLE t_er_repaymentbill ADD (FNEEDIMAGESCAN 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 ='FISENABLEINVOICE')
ALTER TABLE t_er_repaymentbill ADD (FISENABLEINVOICE 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 ='FINVOKEINVOICECLOUD')
ALTER TABLE t_er_repaymentbill ADD (FINVOKEINVOICECLOUD CHAR(1) DEFAULT '0' NOT NULL );
-- 分摊单
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_expensesharebill' AND KSQL_COL_NAME ='FNEEDIMAGESCAN')
ALTER TABLE t_er_expensesharebill ADD (FNEEDIMAGESCAN CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_expensesharebill' AND KSQL_COL_NAME ='FISENABLEINVOICE')
ALTER TABLE t_er_expensesharebill ADD (FISENABLEINVOICE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_expensesharebill' AND KSQL_COL_NAME ='FINVOKEINVOICECLOUD')
ALTER TABLE t_er_expensesharebill ADD (FINVOKEINVOICECLOUD CHAR(1) DEFAULT '0' NOT NULL );
-- 付款申请单
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_applypaybill' AND KSQL_COL_NAME ='FNEEDIMAGESCAN')
ALTER TABLE t_er_applypaybill ADD (FNEEDIMAGESCAN CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_applypaybill' AND KSQL_COL_NAME ='FISENABLEINVOICE')
ALTER TABLE t_er_applypaybill ADD (FISENABLEINVOICE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_applypaybill' AND KSQL_COL_NAME ='FINVOKEINVOICECLOUD')
ALTER TABLE t_er_applypaybill ADD (FINVOKEINVOICECLOUD CHAR(1) DEFAULT '0' NOT NULL );
-- 用车申请单
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_dailyvehiclebill' AND KSQL_COL_NAME ='FNEEDIMAGESCAN')
ALTER TABLE t_er_dailyvehiclebill ADD (FNEEDIMAGESCAN CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_dailyvehiclebill' AND KSQL_COL_NAME ='FISENABLEINVOICE')
ALTER TABLE t_er_dailyvehiclebill ADD (FISENABLEINVOICE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_er_dailyvehiclebill' AND KSQL_COL_NAME ='FINVOKEINVOICECLOUD')
ALTER TABLE t_er_dailyvehiclebill ADD (FINVOKEINVOICECLOUD CHAR(1) DEFAULT '0' NOT NULL );