/**Begin C:\PDM_UPGRADE\PDM1\PUR_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INVOICEDETAIL' AND KSQL_COL_NAME IN ('FINVOICEAMOUNT')) 
 ALTER TABLE T_PUR_INVOICEDETAIL ADD (FINVOICEAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INVOICEDETAIL' AND KSQL_COL_NAME IN ('FINVTAX')) 
 ALTER TABLE T_PUR_INVOICEDETAIL ADD (FINVTAX DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INVOICEDETAIL' AND KSQL_COL_NAME IN ('FINVCHECKSTATUS')) 
 ALTER TABLE T_PUR_INVOICEDETAIL ADD (FINVCHECKSTATUS VARCHAR(1) DEFAULT '3' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_PUR_INVOICEDETAIL' AND KSQL_COL_NAME IN ('FINVSOURCE')) 
 ALTER TABLE T_PUR_INVOICEDETAIL ADD (FINVSOURCE VARCHAR(1) DEFAULT '1' NOT NULL );

/**End C:\PDM_UPGRADE\PDM1\PUR_table.sql **/
