/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_ENGINEERINGBILL') 
 CREATE TABLE T_FA_ENGINEERINGBILL (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(60) DEFAULT '  ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT 'A' 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,
FORGID BIGINT DEFAULT 0 NOT NULL,
FASSETUNITID BIGINT DEFAULT 0 NOT NULL,
FBUSINESSDATE DATETIME,
FBUILDWAY NVARCHAR(30) DEFAULT ' ' NOT NULL,
FREMARK NVARCHAR(255) DEFAULT ' ',
FASSETCATID BIGINT DEFAULT 0 NOT NULL,
FASSETNAME NVARCHAR(60) DEFAULT ' ' NOT NULL,
FUNITID BIGINT DEFAULT 0 NOT NULL,
FASSETQTY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FMODEL NVARCHAR(60) DEFAULT ' ' NOT NULL,
FSTOREPLACEID BIGINT DEFAULT 0 NOT NULL,
FUSEDEPARTMENTID BIGINT DEFAULT 0 NOT NULL,
FASSETQTYCREATE INT DEFAULT 1 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_ENGINEERINGBILLENTRY') 
 CREATE TABLE T_FA_ENGINEERINGBILLENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FOTHERAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FSUPPLIERID BIGINT DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FEQUIPMENTAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FCONSTRACTAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FMATERIALAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FTOTALAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FENTRYREMARK NVARCHAR(255) DEFAULT ' ' NOT NULL
);



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