/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BEI_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_ELECRECEIPT') 
 CREATE TABLE T_BEI_ELECRECEIPT (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS VARCHAR(5) DEFAULT ' ' NOT NULL,
FORGID BIGINT DEFAULT 0 NOT NULL,
FCOMPANYID BIGINT DEFAULT 0 NOT NULL,
FSOURCEBILLID BIGINT DEFAULT 0 NOT NULL,
FBIZDATE DATETIME,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FBASECURRENCYID BIGINT DEFAULT 0 NOT NULL,
FBUSTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FDEBITAMOUNT DECIMAL(19,6),
FCREDITAMOUNT DECIMAL(19,6),
FAMOUNT DECIMAL(19,6),
FLOCAMT DECIMAL(19,6),
FEXCHANGERATE DECIMAL(23,10),
FACCOUNTBANKID BIGINT DEFAULT 0 NOT NULL,
FBANKID BIGINT DEFAULT 0 NOT NULL,
FOPPUNIT NVARCHAR(100) DEFAULT ' ' NOT NULL,
FOPPBANKNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FOPPBANKNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FOPBANK NVARCHAR(100) DEFAULT ' ' NOT NULL,
FISMATCH CHAR(1) DEFAULT '0' NOT NULL,
FTRANSDETAILID BIGINT DEFAULT 0 NOT NULL,
FSERIALNO NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDETAILDATETIME DATETIME,
FRECEIPTNO VARCHAR(100) DEFAULT ' ' NOT NULL,
FVALIDCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FBIZNUMBER NVARCHAR(100) DEFAULT ' ' NOT NULL,
FBANKCHECKFLAG NVARCHAR(255) DEFAULT ' ' 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,
FUSE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FCREDITDEBITFLAG NVARCHAR(100) DEFAULT ' ' NOT NULL,
FFILEFLAG CHAR(1) DEFAULT '0' NOT NULL,
FCOMPLETEFLAG CHAR(1) DEFAULT '0' NOT NULL,
FTRANSNETCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FTRANSTELLNO NVARCHAR(100) DEFAULT ' ' NOT NULL,
FFILESERVERURL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FTCPURL NVARCHAR(100) DEFAULT ' ' NOT NULL,
FFILEPATH NVARCHAR(100) DEFAULT ' ' NOT NULL,
FUPLOADFILENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FHOST NVARCHAR(100) DEFAULT ' ' NOT NULL,
FUSERNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FPASSWORD NVARCHAR(100) DEFAULT ' ' NOT NULL,
FPROXY NVARCHAR(100) DEFAULT ' ' NOT NULL,
FPORT BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BEI_ELECRECEIPT_L') 
 CREATE TABLE T_BEI_ELECRECEIPT_L (
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL
);



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\BEI_table.sql **/
