/**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_FINARBILLENTRY_E' AND KSQL_COL_NAME ='FINVOICEDLOCALAMT') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FINVOICEDLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILLENTRY_E' AND KSQL_COL_NAME ='FUNINVOICEDLOCALAMT') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FUNINVOICEDLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILLENTRY_E' AND KSQL_COL_NAME ='FISSUEINVLOCALAMT') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FISSUEINVLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILLENTRY_E' AND KSQL_COL_NAME ='FISSUEINVLOCALTAX') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FISSUEINVLOCALTAX DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILLENTRY_E' AND KSQL_COL_NAME ='FISSUEINVRECLOCALAMT') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FISSUEINVRECLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL_E' AND KSQL_COL_NAME ='FINVOICEDLOCALAMT') 
 ALTER TABLE T_AR_FINARBILL_E ADD (FINVOICEDLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL_E' AND KSQL_COL_NAME ='FUNINVOICEDLOCALAMT') 
 ALTER TABLE T_AR_FINARBILL_E ADD (FUNINVOICEDLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL_E' AND KSQL_COL_NAME ='FISSUEINVRECLOCALAMT') 
 ALTER TABLE T_AR_FINARBILL_E ADD (FISSUEINVRECLOCALAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILL' AND KSQL_COL_NAME ='FUNITSRCTYPE') 
 ALTER TABLE T_AR_REVCFMBILL ADD (FUNITSRCTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSBILL' AND KSQL_COL_NAME ='FUNITSRCTYPE') 
 ALTER TABLE T_AR_BUSBILL ADD (FUNITSRCTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL' AND KSQL_COL_NAME ='FUNITSRCTYPE') 
 ALTER TABLE T_AR_FINARBILL ADD (FUNITSRCTYPE VARCHAR(30) DEFAULT ' ' NOT NULL );

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