
/* 发票信息分录增加发票类型基础资料  乘车/机日期 **/

/* 对公报销单 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMINVOICEINFO' AND KSQL_COL_NAME ='FINVOICETYPEID')
 ALTER TABLE T_ER_PUBREIMINVOICEINFO ADD (FINVOICETYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMINVOICEINFO' AND KSQL_COL_NAME ='FCARRIERDATE')
 ALTER TABLE T_ER_PUBREIMINVOICEINFO ADD (FCARRIERDATE DATETIME );

/* 费用报销单 差旅报销单 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEINFO' AND KSQL_COL_NAME ='FINVOICETYPEID')
ALTER TABLE T_ER_INVOICEINFO ADD (FINVOICETYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEINFO' AND KSQL_COL_NAME ='FCARRIERDATE')
ALTER TABLE T_ER_INVOICEINFO ADD (FCARRIERDATE DATETIME );

/* 商旅付款申请单 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEINFOCP' AND KSQL_COL_NAME ='FINVOICETYPEID')
ALTER TABLE T_ER_INVOICEINFOCP ADD (FINVOICETYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_INVOICEINFOCP' AND KSQL_COL_NAME ='FCARRIERDATE')
ALTER TABLE T_ER_INVOICEINFOCP ADD (FCARRIERDATE DATETIME );

