/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_COL_NAME ='FTOTALTAXAMOUNT') 
 ALTER TABLE T_SM_RETURNAPPLY ADD (FTOTALTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_COL_NAME ='FTOTALAMOUNT') 
 ALTER TABLE T_SM_RETURNAPPLY ADD (FTOTALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_COL_NAME ='FTOTALALLAMOUNT') 
 ALTER TABLE T_SM_RETURNAPPLY ADD (FTOTALALLAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_COL_NAME ='FCURTOTALAMOUNT') 
 ALTER TABLE T_SM_RETURNAPPLY ADD (FCURTOTALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_RETURNAPPLY' AND KSQL_COL_NAME ='FCURTOTALALLAMOUNT') 
 ALTER TABLE T_SM_RETURNAPPLY ADD (FCURTOTALALLAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_DELIVERNOTICE' AND KSQL_COL_NAME ='FTOTALTAXAMOUNT') 
 ALTER TABLE T_SM_DELIVERNOTICE ADD (FTOTALTAXAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_DELIVERNOTICE' AND KSQL_COL_NAME ='FTOTALAMOUNT') 
 ALTER TABLE T_SM_DELIVERNOTICE ADD (FTOTALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_DELIVERNOTICE' AND KSQL_COL_NAME ='FTOTALALLAMOUNT') 
 ALTER TABLE T_SM_DELIVERNOTICE ADD (FTOTALALLAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_DELIVERNOTICE' AND KSQL_COL_NAME ='FCURTOTALAMOUNT') 
 ALTER TABLE T_SM_DELIVERNOTICE ADD (FCURTOTALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SM_DELIVERNOTICE' AND KSQL_COL_NAME ='FCURTOTALALLAMOUNT') 
 ALTER TABLE T_SM_DELIVERNOTICE ADD (FCURTOTALALLAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );

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