/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PUR_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PUR_INVOICEDETAIL_ATT') 
 CREATE TABLE T_PUR_INVOICEDETAIL_ATT (
FPKID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_PUR_INVOICEDETAIL') 
 CREATE TABLE T_PUR_INVOICEDETAIL (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ BIGINT DEFAULT 0 NOT NULL,
FINVCODE VARCHAR(255) DEFAULT ' ' NOT NULL,
FINVNO VARCHAR(255) DEFAULT ' ' NOT NULL,
FINVDATE DATETIME,
FINVADDR VARCHAR(511) DEFAULT ' ' NOT NULL,
FINVSERIALNUM VARCHAR(255) DEFAULT ' ' NOT NULL,
FINVAMOUNT DECIMAL(23,10) DEFAULT 0 NOT NULL
);

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