/** 发票类型(发票云)基础资料表 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_INVOICETYPE')
CREATE TABLE T_ER_INVOICETYPE (
                                  FID BIGINT DEFAULT 0 NOT NULL,
                                  FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
                                  FSTATUS VARCHAR(36) DEFAULT ' ' NOT NULL,
                                  FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                  FCREATETIME DATETIME,
                                  FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                  FMODIFYTIME DATETIME,
                                  FENABLE CHAR(1) DEFAULT '0' NOT NULL,
                                  FMASTERID BIGINT DEFAULT 0 NOT NULL,
                                  FISDEFAULT CHAR(1) DEFAULT '0' NOT NULL,
                                  FREMARK NVARCHAR(255) DEFAULT ' '
);

/** 发票类型(发票云)基础资料多语言表 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_INVOICETYPE_L')
CREATE TABLE T_ER_INVOICETYPE_L (
                                    FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
                                    FID BIGINT DEFAULT 0 NOT NULL,
                                    FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
                                    FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL
);