/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FA_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FA_LEASE_PAY_RULE' AND KSQL_COL_NAME ='FTAX') 
 ALTER TABLE T_FA_LEASE_PAY_RULE ADD (FTAX DECIMAL(19,4) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_FA_CONSIGNATION_RECORD') 
 CREATE TABLE T_FA_CONSIGNATION_RECORD (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(60) DEFAULT ' ' NOT NULL,
FBILLSTATUS CHAR(1) DEFAULT 'C' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FNUMBER NVARCHAR(50) DEFAULT ' ' NOT NULL,
FMODEL NVARCHAR(255) DEFAULT ' ' NOT NULL,
FDIFFERENCE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINVENTSCHEMEENTRYID BIGINT DEFAULT 0 NOT NULL,
FINVENTORYTASKID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FREALCARDID BIGINT DEFAULT 0 NOT NULL,
FBILLSTATE CHAR(1) DEFAULT '1' NOT NULL,
FCONSIGNORID BIGINT DEFAULT 0 NOT NULL,
FCONSIGNEEID BIGINT DEFAULT 0 NOT NULL
);



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