-- 销售出库单
-- 增加已确认数量
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_saloutbillentry_r' AND KSQL_COL_NAME ='fjoincfmqty')
 ALTER TABLE t_im_saloutbillentry_r ADD (fjoincfmqty DECIMAL(23,10) DEFAULT 0 NOT NULL );

-- 增加已确认基本数量
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_saloutbillentry_r' AND KSQL_COL_NAME ='fjoincfmbaseqty')
 ALTER TABLE t_im_saloutbillentry_r ADD (fjoincfmbaseqty DECIMAL(23,10) DEFAULT 0 NOT NULL );

 -- 增加未确认数量
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_saloutbillentry_r' AND KSQL_COL_NAME ='fremaincfmqty')
 ALTER TABLE t_im_saloutbillentry_r ADD (fremaincfmqty DECIMAL(23,10) DEFAULT 0 NOT NULL );

-- 增加未确认基本数量
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_saloutbillentry_r' AND KSQL_COL_NAME ='fremaincfmbaseqty')
 ALTER TABLE t_im_saloutbillentry_r ADD (fremaincfmbaseqty DECIMAL(23,10) DEFAULT 0 NOT NULL );