/**Begin D:\software\PDM_UPGRADE\PDM1\FPM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_SUPPLEMENT')
CREATE TABLE T_FPM_SUPPLEMENT (
                                  FID BIGINT DEFAULT 0 NOT NULL,
                                  FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
                                  FBILLSTATUS NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                  FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                  FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                  FAUDITORID BIGINT DEFAULT 0 NOT NULL,
                                  FAUDITDATE DATETIME,
                                  FMODIFYTIME DATETIME,
                                  FCREATETIME DATETIME,
                                  FSYSTEMID BIGINT DEFAULT 0 NOT NULL,
                                  FREMARK NVARCHAR(2000) DEFAULT ' ' NOT NULL,
                                  FREGISTRANT BIGINT DEFAULT 0 NOT NULL,
                                  FREGISTRANTIONDATE DATETIME,
                                  FREPORTORGID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FPM_SUPPLEMENT_DETAIL')
CREATE TABLE T_FPM_SUPPLEMENT_DETAIL (
                                         FID BIGINT DEFAULT 0 NOT NULL,
                                         FENTRYID BIGINT DEFAULT 0 NOT NULL,
                                         FSEQ BIGINT DEFAULT 0 NOT NULL,
                                         FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
                                         FCUSTOMMEMID1 BIGINT DEFAULT 0 NOT NULL,
                                         FCUSTOMMEMID2 BIGINT DEFAULT 0 NOT NULL,
                                         FCUSTOMMEMID3 BIGINT DEFAULT 0 NOT NULL,
                                         FBIZAMOUNT DECIMAL(19,4) DEFAULT 0 NOT NULL,
                                         FOPUSERTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL,
                                         FOPUSERID BIGINT DEFAULT 0 NOT NULL,
                                         FBANKCATEID BIGINT DEFAULT 0 NOT NULL,
                                         FCONTRACTNO NVARCHAR(125) DEFAULT ' ' NOT NULL,
                                         FCONTRACTNAME NVARCHAR(125) DEFAULT ' ' NOT NULL,
                                         FSUBJECTMEMID BIGINT DEFAULT 0 NOT NULL,
                                         FCOMPANYMEMID BIGINT DEFAULT 0 NOT NULL,
                                         FSETTLETYPEMEMID BIGINT DEFAULT 0 NOT NULL,
                                         FBIZDATE DATETIME
);



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