/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\GL_table.sql **/

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_BIZVOUCHER' AND KSQL_COL_NAME ='FBILLNO') 
 ALTER TABLE T_AI_BIZVOUCHER ADD (FBILLNO VARCHAR(50) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_BIZVOUCHER' AND KSQL_COL_NAME ='FBILLSTATUS') 
 ALTER TABLE T_AI_BIZVOUCHER ADD (FBILLSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_BIZVOUCHER' AND KSQL_COL_NAME ='FAUDITORID') 
 ALTER TABLE T_AI_BIZVOUCHER ADD (FAUDITORID BIGINT DEFAULT 0 NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_BIZVOUCHER' AND KSQL_COL_NAME ='FAUDITDATE') 
 ALTER TABLE T_AI_BIZVOUCHER ADD (FAUDITDATE DATETIME );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AI_BIZVOUCHER' AND KSQL_COL_NAME ='FLOCALCURRENCYID') 
 ALTER TABLE T_AI_BIZVOUCHER ADD (FLOCALCURRENCYID BIGINT DEFAULT 0 NOT NULL );

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