/**Begin D:\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_APPROVEDPLANQUOTA') 
 CREATE TABLE T_FPM_APPROVEDPLANQUOTA (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSYSTEMID BIGINT DEFAULT 0 NOT NULL,
FSUMMARYT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMEMBER BIGINT DEFAULT 0 NOT NULL,
FORGREPORTTYPE BIGINT DEFAULT 0 NOT NULL,
FEXRATETABLE BIGINT DEFAULT 0 NOT NULL,
FEXRATEDATE DATETIME,
FAMOUNTUNIT NVARCHAR(50) DEFAULT 'one' NOT NULL,
FREPORTID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBILLSTATUS NVARCHAR(10) DEFAULT 'A' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_APPROVEDPLANMATION')
 CREATE TABLE T_FPM_APPROVEDPLANMATION (
FID BIGINT DEFAULT 0 NOT NULL,
FMONETARY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FREPORTDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_APPROVEDPLANDETAILS')
 CREATE TABLE T_FPM_APPROVEDPLANDETAILS (
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FDMONETARY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDETAILID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FREPORTDATAID BIGINT DEFAULT 0 NOT NULL,
FEVALADJUSTREASON NVARCHAR(50) DEFAULT ' ' NOT NULL,
FPLANREPORTNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFILLUSER BIGINT DEFAULT 0 NOT NULL,
FREPORTID BIGINT DEFAULT 0 NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\FPM_table.sql **/
