/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL_E' AND KSQL_COL_NAME ='FISBYRECRATE') 
 ALTER TABLE T_AR_FINARBILL_E ADD (FISBYRECRATE CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARPLANENTRY' AND KSQL_COL_NAME ='FRECRATE') 
 ALTER TABLE T_AR_FINARPLANENTRY ADD (FRECRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARPLANENTRY' AND KSQL_COL_NAME ='FPLANCOREBILLID') 
 ALTER TABLE T_AR_FINARPLANENTRY ADD (FPLANCOREBILLID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_JOURNAL' AND KSQL_COL_NAME ='FESTIMATEDNOTAXAMT')
 ALTER TABLE T_AR_JOURNAL ADD (FESTIMATEDNOTAXAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_JOURNAL' AND KSQL_COL_NAME ='FLOCALESTIMATEDNOTAXAMT')
 ALTER TABLE T_AR_JOURNAL ADD (FLOCALESTIMATEDNOTAXAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

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