/** 开票单 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_INVOICEENTRY' AND KSQL_COL_NAME ='FSRCSYSBILLID')
 ALTER TABLE T_AR_INVOICEENTRY ADD (FSRCSYSBILLID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_INVOICEENTRY' AND KSQL_COL_NAME ='FSRCSYSBILLENTRYID')
 ALTER TABLE T_AR_INVOICEENTRY ADD (FSRCSYSBILLENTRYID VARCHAR(100) DEFAULT ' ' NOT NULL );
/** 月末清理单 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_ar_liquidationentry' AND KSQL_COL_NAME ='FSRCSYSBILLID')
 ALTER TABLE t_ar_liquidationentry ADD (FSRCSYSBILLID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_ar_liquidationentry' AND KSQL_COL_NAME ='FSRCSYSBILLENTRYID')
 ALTER TABLE t_ar_liquidationentry ADD (FSRCSYSBILLENTRYID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_ar_liquidation' AND KSQL_COL_NAME ='FBILLSRCTYPE')
 ALTER TABLE t_ar_liquidation ADD (FBILLSRCTYPE VARCHAR(30) DEFAULT ' ' NOT NULL  );
/** 坏账损失单 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_ar_lossbillentry' AND KSQL_COL_NAME ='FSRCSYSBILLID')
 ALTER TABLE t_ar_lossbillentry ADD (FSRCSYSBILLID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_ar_lossbillentry' AND KSQL_COL_NAME ='FSRCSYSBILLENTRYID')
 ALTER TABLE t_ar_lossbillentry ADD (FSRCSYSBILLENTRYID VARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_ar_baddebtlossbill' AND KSQL_COL_NAME ='FBILLSRCTYPE')
 ALTER TABLE t_ar_baddebtlossbill ADD (FBILLSRCTYPE VARCHAR(30) DEFAULT ' ' NOT NULL  );