/**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_REVCFMBILL' AND KSQL_COL_NAME ='FBOOKDATE') 
 ALTER TABLE T_AR_REVCFMBILL ADD (FBOOKDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_FINARBILL_E' AND KSQL_COL_NAME ='FBOOKDATE') 
 ALTER TABLE T_AR_FINARBILL_E ADD (FBOOKDATE DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSBILL_E' AND KSQL_COL_NAME ='FWRITEOFFBUSINESS') 
 ALTER TABLE T_AR_BUSBILL_E ADD (FWRITEOFFBUSINESS CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_AR_BUSBILL_E' AND KSQL_COL_NAME ='FBOOKDATE') 
 ALTER TABLE T_AR_BUSBILL_E ADD (FBOOKDATE DATETIME );
 EXEC p_AlterColumn 'T_AR_INVOICEENTRY', 'FITEMNAME', 'NVARCHAR(255)', 'NOT NULL', '0100', ''' ''';


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