-- 委外完工入庫單上添加發貨單id與發貨單行id
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_omcpbillentry_r' AND KSQL_COL_NAME ='fsaleoutstockid')
ALTER TABLE t_im_mdc_omcpbillentry_r ADD (fsaleoutstockid varchar(50) NOT NULL DEFAULT ' ' );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_omcpbillentry_r' AND KSQL_COL_NAME ='fsaleoutstockentryid')
ALTER TABLE t_im_mdc_omcpbillentry_r ADD (fsaleoutstockentryid varchar(50) NOT NULL DEFAULT ' ' );
