----对公报销单增加单头业务隐藏字段----
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FBILLPAYERTYPE') 
 ALTER TABLE T_ER_PUBREIMBILL ADD (FBILLPAYERTYPE VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FBILLPAYERID')
 ALTER TABLE T_ER_PUBREIMBILL ADD (FBILLPAYERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FSTDBILLTYPE') 
 ALTER TABLE T_ER_PUBREIMBILL ADD (FSTDBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMBILL' AND KSQL_COL_NAME ='FISONACCOUNT') 
 ALTER TABLE T_ER_PUBREIMBILL ADD (FISONACCOUNT 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 ='FSTDREIMBURSETYPE') 
 ALTER TABLE T_ER_PUBREIMBILL ADD (FSTDREIMBURSETYPE VARCHAR(30) DEFAULT ' ' NOT NULL );

 ----对公报销单费用明细分录字段----
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FENTRYCONTRACTNO') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FENTRYCONTRACTNO NVARCHAR(200) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FENTRYPROJECTNO') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FENTRYPROJECTNO NVARCHAR(200) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FENTRYSUBPROJECTNO') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FENTRYSUBPROJECTNO NVARCHAR(200) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBCURRENCY') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBCURRENCY BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBEXCHANGRATE') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBEXCHANGRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBAMOUNT') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBCURAMOUNT') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBCURAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBSRCBILLID') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBSRCBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBSRCENTRYID') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBSRCENTRYID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBSRCBILLTYPE') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBSRCBILLTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBSRCBILLNO') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBSRCBILLNO NVARCHAR(200) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FWBPAYTYPE') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FWBPAYTYPE VARCHAR(80) DEFAULT ' ' NOT NULL );

 ----对公报销单冲借款分录字段----
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMWRIOFFDET' AND KSQL_COL_NAME ='FSRCOFSRCENTRYID') 
 ALTER TABLE T_ER_PUBREIMWRIOFFDET ADD (FSRCOFSRCENTRYID BIGINT DEFAULT 0 NOT NULL );

 ----对公报销单收款信息分录----
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMACCINFO' AND KSQL_COL_NAME ='FISPAYNOW') 
 ALTER TABLE T_ER_PUBREIMACCINFO ADD (FISPAYNOW CHAR(1) DEFAULT '0' NOT NULL );