/**Begin D:\pdm\PDM_UPGRADE\pdm_new\RIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_INVSIGN_LOG') 
 CREATE TABLE T_RIM_INVSIGN_LOG (
FID BIGINT DEFAULT 0 NOT NULL,
FEXPENSE_NUM NVARCHAR(50) DEFAULT ' ' NOT NULL,
FEXPENSE_ID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBATCH NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTRACEID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATER BIGINT DEFAULT 0 NOT NULL,
FCREATEDATE DATETIME,
FATTACH_COUNT BIGINT DEFAULT 0 NOT NULL,
FINVOICE_COUNT BIGINT DEFAULT 0 NOT NULL,
FSIGN_TYPE NVARCHAR(50) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_RIM_INVSIGN_LOG_ITEM') 
 CREATE TABLE T_RIM_INVSIGN_LOG_ITEM (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSERIAL_NO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINVOICE_NO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINVOICE_TYPE BIGINT DEFAULT 0 NOT NULL,
FINVOICE_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTOTAL_TAX_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTOTAL_AMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);



/**End D:\pdm\PDM_UPGRADE\pdm_new\RIM_table.sql **/
