/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_PURINBILL_F' AND KSQL_COL_NAME ='FINVOICEBIZTYPEID') 
 ALTER TABLE T_IM_PURINBILL_F ADD (FINVOICEBIZTYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_PURRECBILL_F' AND KSQL_COL_NAME ='FINVOICEBIZTYPEID') 
 ALTER TABLE T_IM_PURRECBILL_F ADD (FINVOICEBIZTYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_PURINBILLENTRY_F' AND KSQL_COL_NAME ='FTAXPAYERTYPE') 
 ALTER TABLE T_IM_PURINBILLENTRY_F ADD (FTAXPAYERTYPE CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_OSPURINBILL' AND KSQL_COL_NAME ='FINVOICEBIZTYPEID') 
 ALTER TABLE T_IM_OSPURINBILL ADD (FINVOICEBIZTYPEID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_OSPURINBILLENTRY' AND KSQL_COL_NAME ='FTAXPAYERTYPE') 
 ALTER TABLE T_IM_OSPURINBILLENTRY ADD (FTAXPAYERTYPE CHAR(1) DEFAULT ' ' NOT NULL );

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