/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\IM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IM_MDC_OMMATRLWRFENTRY') 
 CREATE TABLE T_IM_MDC_OMMATRLWRFENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ DECIMAL(10) DEFAULT 0 NOT NULL,
FVERIFYBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FBILLID BIGINT DEFAULT 0 NOT NULL,
FBILLENTRYID BIGINT DEFAULT 0 NOT NULL,
FBILLTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FWFINFO NVARCHAR(255) DEFAULT ' ' NOT NULL,
FWFINFO_TAG NCLOB,
FSRCBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FDATEFIELD DATETIME,
FASSTMATERIAL BIGINT DEFAULT 0 NOT NULL,
FASSTUNIT BIGINT DEFAULT 0 NOT NULL,
FINVSCHEME BIGINT DEFAULT 0 NOT NULL,
FASSTBASEWRITQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FSRCENTRYSEQ BIGINT DEFAULT 0 NOT NULL,
FASSTSRCBILLENTRYSEQ BIGINT DEFAULT 0 NOT NULL,
FUNITFIELD BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IM_MDC_OMMATRLWRFRECORD') 
 CREATE TABLE T_IM_MDC_OMMATRLWRFRECORD (
FID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FHEADWFINFO NVARCHAR(255) DEFAULT ' ' NOT NULL,
FHEADWFINFO_TAG NCLOB,
FWFNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FWFSEQ NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSUPPLY BIGINT DEFAULT 0 NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FWRITEOFFRELA NVARCHAR(50) DEFAULT ' ' NOT NULL,
FWRITEOFFTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXCHANGERATE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMAINCURRENCY BIGINT DEFAULT 0 NOT NULL,
FCURRENCYFIELD BIGINT DEFAULT 0 NOT NULL
);



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