-- Create Table Statement for 'Client Transaction'
DROP TABLE IF EXISTS `CLIENT_TRANSACTION`;
CREATE TABLE `CLIENT_TRANSACTION` (
	ID bigint(20) NOT NULL,
	MERCHANT_ACCOUNT_CODE int(11) NOT NULL,
	CREATE_DATE datetime,
	TRANSACTION_CL varchar,
	SOURCE_CL varchar,
	TRANSACTION_AMOUNT int(11),
	PROCESSING_FEE_RATE int(11),
	PROCESSING_FEE_AMOUNT int(11),
	PAYABLE_AMOUNT int(11),
	CLIENT_PAYOUT_RATE int(11),
	CLIENT_PAYOUT_AMOUNT int(11),
	COLLECTED_AMOUNT int(11),
	PARTNER_PAYOUT_RATE int(11),
	PARTNER_PAYOUT_AMOUNT int(11),
	COMMISSIONABLE_AMOUNT int(11),
	AGENT_PAYOUT_RATE int(11),
	AGENT_PAYOUT_AMOUNT int(11),
	NET_AMOUNT int(11),
	IS_VISIBLE_EXTERNALLY tinyint(1),
	CLIENT_FEE_CODE bigint(20),
	CLIENT_STATEMENT_CODE bigint(20),
	PARTNER_STATEMENT_CODE bigint(20),
	AGENT_STATEMENT_CODE bigint(20),
	COMPANY_STATEMENT_CODE bigint(20),
	PARTNER_CODE int(11),
	NOTES varchar,
	IS_CALCULATION_REQUIRED tinyint(1),
	ORIGINAL_TRANSACTION_FK bigint(20),
	CUSTOMER_ACCOUNT_FK bigint(20),
	ACCOUNT_TRANSACTION_FK bigint(20),
	PRIMARY KEY (ID)
) ENGINE=InnoDB;