-- 利库建议 修改表T_IM_INVADVICEENTRY，新增字段
-- 新增行作废状态字段、采购组织字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_INVADVICEENTRY' AND KSQL_COL_NAME IN ('FISCANCEL'))
ALTER TABLE T_IM_INVADVICEENTRY ADD (FISCANCEL CHAR(1) DEFAULT ' ' NOT NULL);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_INVADVICEENTRY' AND KSQL_COL_NAME IN ('FPURORGID'))
ALTER TABLE T_IM_INVADVICEENTRY ADD (FPURORGID BIGINT DEFAULT 0 NOT NULL);