/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_E' AND KSQL_COL_NAME ='FTAXADJUST') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_E ADD (FTAXADJUST VARCHAR(4) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_SIM_ORIGINAL_BILL_E' AND KSQL_COL_NAME ='FMATERIALTYPEBASE') 
 ALTER TABLE T_SIM_ORIGINAL_BILL_E ADD (FMATERIALTYPEBASE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SIM_REPAIR_INVOICE') 
 CREATE TABLE T_SIM_REPAIR_INVOICE (
FINVOICEPK BIGINT DEFAULT 0 NOT NULL,
FBUSINESSTYPE VARCHAR(10) DEFAULT ' ' NOT NULL,
FINVOICECODE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINVOICENO VARCHAR(50) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FORDERNO VARCHAR(50) DEFAULT ' ' NOT NULL
);



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