-- 简单委外入库单增加成组号和成组行号字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_OMINBILLENTRY' AND KSQL_COL_NAME ='FGROUPNUMBER')
ALTER TABLE T_IM_MDC_OMINBILLENTRY ADD (FGROUPNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_OMINBILLENTRY' AND KSQL_COL_NAME ='FGROUPSEQ')
ALTER TABLE T_IM_MDC_OMINBILLENTRY ADD (FGROUPSEQ NVARCHAR(50) DEFAULT ' ' NOT NULL );
