-- 变更单主、副账簿分录表增加租赁参与对账需要的字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FAFTLEASEDEBTPRESENT') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FAFTLEASEDEBTPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FLEASEDEBTPRESENTCHG') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FLEASEDEBTPRESENTCHG DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FNOCONFIRMFINCOSTCHG') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FNOCONFIRMFINCOSTCHG DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FBEFNOCONFIRMFINCOST') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FBEFNOCONFIRMFINCOST DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FAFTLEASEDEBTORIGIN') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FAFTLEASEDEBTORIGIN DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FAFTNOCONFIRMFINCOST') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FAFTNOCONFIRMFINCOST DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FBEFLEASEDEBTORIGIN') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FBEFLEASEDEBTORIGIN DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FLEASEDEBTORIGINCHG') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FLEASEDEBTORIGINCHG DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLMAINENTRY' AND KSQL_COL_NAME ='FBEFLEASEDEBTPRESENT') 
 ALTER TABLE T_FA_CHANGEBILLMAINENTRY ADD (FBEFLEASEDEBTPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FAFTLEASEDEBTPRESENT') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FAFTLEASEDEBTPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FLEASEDEBTPRESENTCHG') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FLEASEDEBTPRESENTCHG DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FNOCONFIRMFINCOSTCHG') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FNOCONFIRMFINCOSTCHG DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FBEFNOCONFIRMFINCOST') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FBEFNOCONFIRMFINCOST DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FAFTLEASEDEBTORIGIN') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FAFTLEASEDEBTORIGIN DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FAFTNOCONFIRMFINCOST') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FAFTNOCONFIRMFINCOST DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FBEFLEASEDEBTORIGIN') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FBEFLEASEDEBTORIGIN DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FLEASEDEBTORIGINCHG') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FLEASEDEBTORIGINCHG DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_CHANGEBILLOTHERENTRY' AND KSQL_COL_NAME ='FBEFLEASEDEBTPRESENT') 
 ALTER TABLE T_FA_CHANGEBILLOTHERENTRY ADD (FBEFLEASEDEBTPRESENT DECIMAL(23,10) DEFAULT 0 NOT NULL );