/**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' AND KSQL_COL_NAME ='FCONFIRMEDBASEQTY') 
 ALTER TABLE T_AR_FINARBILLENTRY ADD (FCONFIRMEDBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILLENTRY' AND KSQL_COL_NAME ='FUNCONFIRMBASEQTY') 
 ALTER TABLE T_AR_FINARBILLENTRY ADD (FUNCONFIRMBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FTAXRATEID') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FTAXRATEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FTAXRATE') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FTAXRATE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FCONFIRMLOCAMT') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FCONFIRMLOCAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FCONFIRMTAX') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FCONFIRMTAX DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FCONFIRMLOCTAX') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FCONFIRMLOCTAX DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FCFMPRICETAX') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FCFMPRICETAX DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FCFMPRICETAXBASE') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FCFMPRICETAXBASE DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FUNRECQTY') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FUNRECQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FUNRECBASEQTY') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FUNRECBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FRECQTY') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FRECQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FRECBASEQTY') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FRECBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FUNRECAMT') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FUNRECAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FRECAMT') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FRECAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_REVCFMBILLENTRY' AND KSQL_COL_NAME ='FCONFIRMBASEQTY') 
 ALTER TABLE T_AR_REVCFMBILLENTRY ADD (FCONFIRMBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSBILLENTRY_E' AND KSQL_COL_NAME ='FCONFIRMEDQTY')
 ALTER TABLE T_AR_BUSBILLENTRY_E ADD (FCONFIRMEDQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSBILLENTRY_E' AND KSQL_COL_NAME ='FUNCONFIRMQTY')
 ALTER TABLE T_AR_BUSBILLENTRY_E ADD (FUNCONFIRMQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );

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