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

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