/**Begin D:\tool\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_INVOICE_CLASS') 
 CREATE TABLE T_RIM_INVOICE_CLASS (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(50) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(10) DEFAULT 'C' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(10) DEFAULT '1' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FUSER VARCHAR(50) DEFAULT ' ' NOT NULL,
FINNER_USERID BIGINT DEFAULT 0 NOT NULL,
FISEDIT VARCHAR(10) DEFAULT '1' NOT NULL,
FISDEFAULT VARCHAR(10) DEFAULT '0' NOT NULL,
FINDEX BIGINT DEFAULT 0 NOT NULL,
FCUSTOM_COUNT BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_INVOICE_CLASS_L') 
 CREATE TABLE T_RIM_INVOICE_CLASS_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME VARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_INVOICE_CLASS_CUSTO') 
 CREATE TABLE T_RIM_INVOICE_CLASS_CUSTO (
FID BIGINT DEFAULT 0 NOT NULL,
FCLASS_TEXT VARCHAR(50) DEFAULT ' ' NOT NULL,
FCUSTOM_COUNT BIGINT DEFAULT 0 NOT NULL,
FFIRST_DATE DATETIME,
FNEW_DATE DATETIME,
FDELETE_DATE DATETIME,
FUSERID BIGINT DEFAULT 0 NOT NULL,
FOPERATEID BIGINT DEFAULT 0 NOT NULL,
FUSER VARCHAR(50) DEFAULT ' ' NOT NULL,
FOPERATE VARCHAR(50) DEFAULT ' ' NOT NULL,
FINVOICE_CLASSID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_INVOICE_MUL_CLASS') 
 CREATE TABLE T_RIM_INVOICE_MUL_CLASS (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);



/**End D:\tool\PDM_UPGRADE_1.3\PDM_UPGRADE\pdm1\RIM_table.sql **/
