/**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 ='FINVOICECODE') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FINVOICECODE VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILLENTRY_E' AND KSQL_COL_NAME ='FINVOICENO') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FINVOICENO VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILLENTRY_E' AND KSQL_COL_NAME ='FISSUEINVQTY')
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FISSUEINVQTY 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 ='FISSUEINVAMT') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FISSUEINVAMT 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 ='FISSUEINVTAX') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FISSUEINVTAX 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 ='FISSUEINVRECAMT') 
 ALTER TABLE T_AR_FINARBILLENTRY_E ADD (FISSUEINVRECAMT 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 ='FINVOICECODE') 
 ALTER TABLE T_AR_FINARBILL_E ADD (FINVOICECODE VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL_E' AND KSQL_COL_NAME ='FINVOICENO') 
 ALTER TABLE T_AR_FINARBILL_E ADD (FINVOICENO VARCHAR(255) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL_E' AND KSQL_COL_NAME ='FISSUEINVRECAMT')
 ALTER TABLE T_AR_FINARBILL_E ADD (FISSUEINVRECAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

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