/**Begin D:\PDM_UPGRADE\PDM1\TCTB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_TAXCALENDAR_LIST') 
 CREATE TABLE T_TCTB_TAXCALENDAR_LIST (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO VARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FAUDITORID BIGINT DEFAULT 0 NOT NULL,
FAUDITDATE DATETIME,
FMODIFYTIME DATETIME,
FCREATETIME DATETIME,
FTAXYEARID BIGINT DEFAULT 0 NOT NULL,
FTAXATIONSYSID BIGINT DEFAULT 0 NOT NULL,
FTAXCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FTAXCYCLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FSKSSQQ DATETIME,
FDATEFIELD1 DATETIME,
FSBJZRQ DATETIME,
FJKJZRQ DATETIME,
FPERIODYEAR BIGINT DEFAULT 0 NOT NULL,
FTAXAREAGROUPID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_TAXCALENDAR_RULE') 
 CREATE TABLE T_TCTB_TAXCALENDAR_RULE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(30) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FGROUPID BIGINT DEFAULT 0 NOT NULL,
FTAXCATEGORYID BIGINT DEFAULT 0 NOT NULL,
FTAXCYCLE VARCHAR(50) DEFAULT ' ' NOT NULL,
FTAXAREAGROUPID BIGINT DEFAULT 0 NOT NULL,
FSBJZRNSSDLX VARCHAR(50) DEFAULT ' ' NOT NULL,
FSBJZRY BIGINT DEFAULT 0 NOT NULL,
FSBJZRT BIGINT DEFAULT 0 NOT NULL,
FJKJZRNSSDLX VARCHAR(50) DEFAULT ' ' NOT NULL,
FJKJZRY BIGINT DEFAULT 0 NOT NULL,
FJKJZRT BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_TCTB_TAXCALENDAR_RULE_L') 
 CREATE TABLE T_TCTB_TAXCALENDAR_RULE_L (
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);



/**End D:\PDM_UPGRADE\PDM1\TCTB_table.sql **/
