/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_CURRENCYEXRULE') 
 CREATE TABLE T_INT_CURRENCYEXRULE (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_ENABLEDEXRULE') 
 CREATE TABLE T_INT_ENABLEDEXRULE (
FID BIGINT DEFAULT 0 NOT NULL,
FISENABLED CHAR(1) DEFAULT '0' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FDISABLEDATE DATETIME
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_EXRULEENTRY') 
 CREATE TABLE T_INT_EXRULEENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSOURCECUR BIGINT DEFAULT 0 NOT NULL,
FTARGETCUR BIGINT DEFAULT 0 NOT NULL,
FEFFECTIVEDATE DATETIME,
FISINDIRECT CHAR(1) DEFAULT '1' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_INT_EXRULELOG') 
 CREATE TABLE T_INT_EXRULELOG (
FID BIGINT DEFAULT 0 NOT NULL,
FSOURCECUR BIGINT DEFAULT 0 NOT NULL,
FTARGETCUR BIGINT DEFAULT 0 NOT NULL,
FEFFECTIVEDATE DATETIME,
FISINDIRECT NVARCHAR(32) DEFAULT ' ' NOT NULL,
FOPTYPE CHAR(1) DEFAULT '0' NOT NULL,
FOLDVALUE CHAR(1) DEFAULT '0' NOT NULL,
FNEWVALUE CHAR(1) DEFAULT '0' NOT NULL,
FOPTIME DATETIME,
FUSERID BIGINT DEFAULT 0 NOT NULL
);


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\BOS_table.sql **/
