/**Begin D:\d_desk\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SIM_BUEYER_BILL') 
 CREATE TABLE T_SIM_BUEYER_BILL (
FID BIGINT DEFAULT 0 NOT NULL,
FBUYERNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FBUYERTAXNO NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINVOICETYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FTOTALAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTOTALTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FORG BIGINT DEFAULT 0 NOT NULL,
FINVOICENUM BIGINT DEFAULT 0 NOT NULL,
FDATE DATETIME
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_SIM_GOODS_BILL') 
 CREATE TABLE T_SIM_GOODS_BILL (
FID BIGINT DEFAULT 0 NOT NULL,
FORG BIGINT DEFAULT 0 NOT NULL,
FGOODSNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FGOODSCODE NVARCHAR(50) DEFAULT ' ' NOT NULL,
FSPECIFICATION NVARCHAR(50) DEFAULT ' ' NOT NULL,
FUNIT NVARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXRATE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTAX DECIMAL(23,10) DEFAULT 0 NOT NULL,
FINVOICENUM BIGINT DEFAULT 0 NOT NULL,
FDATE DATETIME
);



/**End D:\d_desk\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_table.sql **/
