/**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_INVDIFFERERENTRY') 
 CREATE TABLE T_FA_INVDIFFERERENTRY (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FASSETUNITID BIGINT DEFAULT 0 NOT NULL,
FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBARCODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBOOKQUANTITY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINVENTORYQUANTITY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FDIFFERQUANTITY DECIMAL(23,10) DEFAULT 0 NOT NULL,
FASSETQTYLEFT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINVENTORYWAY CHAR(1) DEFAULT ' ' NOT NULL,
FINVENTORYTIME DATETIME,
FINVENTORYDIFFER CHAR(1) DEFAULT ' ' NOT NULL,
FUNITID BIGINT DEFAULT 0 NOT NULL,
FSTOREPLACEID BIGINT DEFAULT 0 NOT NULL,
FHEADUSEDEPTID BIGINT DEFAULT 0 NOT NULL,
FDIFFERAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FCHANGEMODEID BIGINT DEFAULT 0 NOT NULL,
FREMARK NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINVENTORYTASKID BIGINT DEFAULT 0 NOT NULL,
FINVENTORYDIFFERSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
FREALCARDID BIGINT DEFAULT 0 NOT NULL,
FINVENTORYRECORDID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_INVDIFFER') 
 CREATE TABLE T_FA_INVDIFFER (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FINVENTSCHEMEID BIGINT DEFAULT 0 NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FINVENTORYLOSSAMOUNT DECIMAL(19,6) DEFAULT 0 NOT NULL,
FASSETQTY DECIMAL(23,10) DEFAULT 0 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,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FAUDITDATE DATETIME
);



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