| /* table contains details of loans that have had overpayments aka payments in advance */ |
| |
| CREATE TABLE `m_loan_paid_in_advance` ( |
| `loan_id` bigint(20) NOT NULL, |
| `principal_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', |
| `interest_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', |
| `fee_charges_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', |
| `penalty_charges_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', |
| `total_in_advance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', |
| PRIMARY KEY (`loan_id`), |
| CONSTRAINT `m_loan_paid_in_advance_ibfk_1` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |