--完工入库增加 父联副产品分录ID
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_PRBLENTRY_M' AND KSQL_COL_NAME ='FPID')
 ALTER TABLE T_IM_MDC_PRBLENTRY_M ADD (FPID NVARCHAR(50) DEFAULT ' ' NOT NULL );
 
--委外完工入库增加 父联副产品分录ID
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_OMCPBILLENTRY_R' AND KSQL_COL_NAME ='FPID')
 ALTER TABLE T_IM_MDC_OMCPBILLENTRY_R ADD (FPID NVARCHAR(50) DEFAULT ' ' NOT NULL );