/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL' AND KSQL_COL_NAME ='FITEMREASONFORTRANSFEROUT') 
 ALTER TABLE T_ER_EXPENSEDETAIL ADD (FITEMREASONFORTRANSFEROUT VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_EXPENSEDETAIL' AND KSQL_COL_NAME ='FITEMINOUTAMOUNT') 
 ALTER TABLE T_ER_EXPENSEDETAIL ADD (FITEMINOUTAMOUNT 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 ='FITEMREASONFORTRANSFEROUT') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FITEMREASONFORTRANSFEROUT VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_PUBREIMEXPDET' AND KSQL_COL_NAME ='FITEMINOUTAMOUNT') 
 ALTER TABLE T_ER_PUBREIMEXPDET ADD (FITEMINOUTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEENTRY' AND KSQL_COL_NAME ='FITEMREASONFORTRANSFEROUT') 
 ALTER TABLE T_ER_REIMBURSEENTRY ADD (FITEMREASONFORTRANSFEROUT VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_REIMBURSEENTRY' AND KSQL_COL_NAME ='FITEMINOUTAMOUNT') 
 ALTER TABLE T_ER_REIMBURSEENTRY ADD (FITEMINOUTAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\ER_table.sql **/
