/**Begin D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILLENTRY' AND KSQL_COL_NAME IN ('FEREMAINREFUNDAMT'))
 ALTER TABLE T_CAS_AGENTPAYBILLENTRY ADD (FEREMAINREFUNDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILLENTRY' AND KSQL_COL_NAME IN ('FEREMAINREFUNDAMT'))
 ALTER TABLE T_CAS_PAYMENTBILLENTRY ADD (FEREMAINREFUNDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL' AND KSQL_COL_NAME IN ('FTOTALREFUNDEDAMT'))
 ALTER TABLE T_CAS_AGENTPAYBILL ADD (FTOTALREFUNDEDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL' AND KSQL_COL_NAME IN ('FTOTALREMAINREFUNDAMT'))
 ALTER TABLE T_CAS_AGENTPAYBILL ADD (FTOTALREMAINREFUNDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL' AND KSQL_COL_NAME IN ('FLOCALREFUNDEDAMT'))
 ALTER TABLE T_CAS_AGENTPAYBILL ADD (FLOCALREFUNDEDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_AGENTPAYBILL' AND KSQL_COL_NAME IN ('FLOCALREMAINREFUNDAMT'))
 ALTER TABLE T_CAS_AGENTPAYBILL ADD (FLOCALREMAINREFUNDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FTOTALREFUNDEDAMT'))
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FTOTALREFUNDEDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FTOTALREMAINREFUNDAMT'))
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FTOTALREMAINREFUNDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FLOCALREFUNDEDAMT'))
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FLOCALREFUNDEDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_PAYMENTBILL' AND KSQL_COL_NAME IN ('FLOCALREMAINREFUNDAMT'))
 ALTER TABLE T_CAS_PAYMENTBILL ADD (FLOCALREMAINREFUNDAMT DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End D:\PDM_UPGRADE\PDM1\CAS_table.sql **/
