IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IFM_PAYACCEPTANCE_E' AND KSQL_COL_NAME IN ('FBANKACCOUNTID'))
 ALTER TABLE T_IFM_PAYACCEPTANCE_E ADD (FBANKACCOUNTID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IFM_TRANSHANDLE_E' AND KSQL_COL_NAME IN ('FBANKACCOUNTID'))
 ALTER TABLE T_IFM_TRANSHANDLE_E ADD (FBANKACCOUNTID BIGINT DEFAULT 0 NOT NULL );

 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IFM_INTBILL_BATCH_INT' AND KSQL_COL_NAME IN ('FBANKACCOUNTID'))
  ALTER TABLE T_IFM_INTBILL_BATCH_INT ADD (FBANKACCOUNTID BIGINT DEFAULT 0 NOT NULL );
  
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IFM_DEDUCTION_C') 
 CREATE TABLE T_IFM_DEDUCTION_C (
FID BIGINT DEFAULT 0 NOT NULL,
FISCROSSPAY CHAR(1) DEFAULT '0' NOT NULL,
FCROSSTRANTYPEID BIGINT DEFAULT 0 NOT NULL,
FRECADDRESS NVARCHAR(300) DEFAULT ' ' NOT NULL,
FPAYMENTTERM NVARCHAR(30) DEFAULT '0' NOT NULL,
FRECEMAIL NVARCHAR(500) DEFAULT ' ' NOT NULL,
FRECCOUNTRYID BIGINT DEFAULT 0 NOT NULL,
FRECPROVINCE NVARCHAR(255) DEFAULT ' ' NOT NULL,
FRECCITY NVARCHAR(255) DEFAULT ' ' NOT NULL,
FRECBANKADDRESS NVARCHAR(400) DEFAULT ' ' NOT NULL,
FRECSWIFTCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRECROUTINGNUM NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRECOTHERCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FINSTRUCTMSG NVARCHAR(80) DEFAULT ' ' NOT NULL,
FAUDITPARAM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTRANSTYPEID BIGINT DEFAULT 0 NOT NULL,
FPAYMETHOD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSERLEVEL NVARCHAR(80) DEFAULT ' ' NOT NULL,
FCHECKTYPE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSENDWAY NVARCHAR(80) DEFAULT ' ' NOT NULL,
FCHECKUSE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSETTLEMENTMETHOD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FMOBILE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FPAYMENTFPS NVARCHAR(80) DEFAULT ' ' NOT NULL,
FPAYMENTAREACODE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FINFORPAYMENT CHAR(1) DEFAULT '0' NOT NULL,
FINFORMRECEMAIL NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKID BIGINT DEFAULT 0 NOT NULL,
FPROXYBEBANKNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKSC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKAD NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKCOUNTRYID BIGINT DEFAULT 0 NOT NULL,
FPROXYBEBANKACTNO NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKACTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IFM_PAYACCEPTANCE_C') 
 CREATE TABLE T_IFM_PAYACCEPTANCE_C (
FID BIGINT DEFAULT 0 NOT NULL,
FISCROSSPAY CHAR(1) DEFAULT '0' NOT NULL,
FCROSSTRANTYPEID BIGINT DEFAULT 0 NOT NULL,
FRECADDRESS NVARCHAR(300) DEFAULT ' ' NOT NULL,
FPAYMENTTERM NVARCHAR(30) DEFAULT '0' NOT NULL,
FRECEMAIL NVARCHAR(500) DEFAULT ' ' NOT NULL,
FRECBANKADDRESS NVARCHAR(400) DEFAULT ' ' NOT NULL,
FRECSWIFTCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRECROUTINGNUM NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRECOTHERCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FINSTRUCTMSG NVARCHAR(80) DEFAULT ' ' NOT NULL,
FAUDITPARAM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTRANSTYPEID BIGINT DEFAULT 0 NOT NULL,
FPAYMETHOD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSERLEVEL NVARCHAR(80) DEFAULT ' ' NOT NULL,
FCHECKTYPE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSENDWAY NVARCHAR(80) DEFAULT ' ' NOT NULL,
FCHECKUSE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSETTLEMENTMETHOD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FMOBILE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FPAYMENTFPS NVARCHAR(80) DEFAULT ' ' NOT NULL,
FPAYMENTAREACODE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FINFORPAYMENT CHAR(1) DEFAULT '0' NOT NULL,
FINFORMRECEMAIL NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKID BIGINT DEFAULT 0 NOT NULL,
FPROXYBEBANKNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKSC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKAD NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKCOUNTRYID BIGINT DEFAULT 0 NOT NULL,
FPROXYBEBANKACTNO NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKACTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_IFM_TRANSHANDLE_C') 
 CREATE TABLE T_IFM_TRANSHANDLE_C (
FID BIGINT DEFAULT 0 NOT NULL,
FISCROSSPAY CHAR(1) DEFAULT '0' NOT NULL,
FCROSSTRANTYPEID BIGINT DEFAULT 0 NOT NULL,
FRECADDRESS NVARCHAR(300) DEFAULT ' ' NOT NULL,
FPAYMENTTERM NVARCHAR(30) DEFAULT '0' NOT NULL,
FRECEMAIL NVARCHAR(500) DEFAULT ' ' NOT NULL,
FRECBANKADDRESS NVARCHAR(400) DEFAULT ' ' NOT NULL,
FRECSWIFTCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRECROUTINGNUM NVARCHAR(100) DEFAULT ' ' NOT NULL,
FRECOTHERCODE NVARCHAR(100) DEFAULT ' ' NOT NULL,
FINSTRUCTMSG NVARCHAR(80) DEFAULT ' ' NOT NULL,
FAUDITPARAM NVARCHAR(255) DEFAULT ' ' NOT NULL,
FTRANSTYPEID BIGINT DEFAULT 0 NOT NULL,
FPAYMETHOD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSERLEVEL NVARCHAR(80) DEFAULT ' ' NOT NULL,
FCHECKTYPE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSENDWAY NVARCHAR(80) DEFAULT ' ' NOT NULL,
FCHECKUSE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FSETTLEMENTMETHOD NVARCHAR(80) DEFAULT ' ' NOT NULL,
FMOBILE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FPAYMENTFPS NVARCHAR(80) DEFAULT ' ' NOT NULL,
FPAYMENTAREACODE NVARCHAR(80) DEFAULT ' ' NOT NULL,
FINFORPAYMENT CHAR(1) DEFAULT '0' NOT NULL,
FINFORMRECEMAIL NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKID BIGINT DEFAULT 0 NOT NULL,
FPROXYBEBANKNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKSC NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKAD NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKCOUNTRYID BIGINT DEFAULT 0 NOT NULL,
FPROXYBEBANKACTNO NVARCHAR(255) DEFAULT ' ' NOT NULL,
FPROXYBEBANKACTNAME NVARCHAR(255) DEFAULT ' ' NOT NULL
);