/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/
--生产工单分录增加开工记账日期、关闭记账日期
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FBEGINBOOKDATE') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FBEGINBOOKDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_MFTORDERENTRY' AND KSQL_COL_NAME ='FCLOSEBOOKDATE') 
 ALTER TABLE T_POM_MFTORDERENTRY ADD (FCLOSEBOOKDATE DATETIME);
--生产工单变更单增加开工记账日期、关闭记账日期
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERENTRY' AND KSQL_COL_NAME ='FBEGINBOOKDATE') 
 ALTER TABLE T_POM_XMFTORDERENTRY ADD (FBEGINBOOKDATE DATETIME);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERENTRY' AND KSQL_COL_NAME ='FCLOSEBOOKDATE') 
 ALTER TABLE T_POM_XMFTORDERENTRY ADD (FCLOSEBOOKDATE DATETIME);
--生产工单变更日志增加开工记账日期
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_XMFTORDERMLOG' AND KSQL_COL_NAME ='FBEGINBOOKDATE') 
 ALTER TABLE T_POM_XMFTORDERMLOG ADD (FBEGINBOOKDATE DATETIME);
--生产工单拆分日志增加开工记账日期
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_POM_SPLITENTRY' AND KSQL_COL_NAME ='FBEGINBOOKDATE') 
 ALTER TABLE T_POM_SPLITENTRY ADD (FBEGINBOOKDATE DATETIME);
/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\POM_table.sql **/

