IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_RESETINITBALANCE')
 CREATE TABLE T_CAS_RESETINITBALANCE (
FID BIGINT DEFAULT 0 NOT NULL,
FBILLNO NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBILLSTATUS NVARCHAR(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,
FORGID BIGINT DEFAULT 0 NOT NULL,
FSTARTPERIODID BIGINT DEFAULT 0 NOT NULL,
FCURRENTPERIODID BIGINT DEFAULT 0 NOT NULL,
FRESETINITBALPERIOD BIGINT DEFAULT 0 NOT NULL,
FDISCARD CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_CAS_ACCBALANCEINFO')
 CREATE TABLE T_CAS_ACCBALANCEINFO (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FMODIFIERFIELD BIGINT DEFAULT 0 NOT NULL,
FMODIFYDATEFIELD DATETIME,
FACCOUNTBANKID BIGINT DEFAULT 0 NOT NULL,
FACCOUNTBANKNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FACCOUNTCASHID BIGINT DEFAULT 0 NOT NULL,
FACCOUNTCASHNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FCURRENCYID BIGINT DEFAULT 0 NOT NULL,
FOPENORGID BIGINT DEFAULT 0 NOT NULL,
FCREATEORGFIELD NVARCHAR(50) DEFAULT ' ' NOT NULL,
FINTBALANCE DECIMAL(23,10) DEFAULT 0 NOT NULL,
FTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL
);

