add relationship between loan product and the loan transaction processing strategy. its optional by default for loan product and loans. If no value selected it will default to the the 'Mifos style' repayment strategy which is pay off interest, then principal in all cases.
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
-- add loan transactions processing table
|
||||
|
||||
CREATE TABLE `ref_loan_transaction_processing_strategy` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(100) DEFAULT NULL,
|
||||
`name` varchar(255) DEFAULT NULL,
|
||||
`createdby_id` bigint(20) DEFAULT NULL,
|
||||
`created_date` datetime DEFAULT NULL,
|
||||
`lastmodifiedby_id` bigint(20) DEFAULT NULL,
|
||||
`lastmodified_date` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ltp_strategy_code` (`code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
ALTER TABLE `portfolio_product_loan`
|
||||
ADD COLUMN `loan_transaction_strategy_id` bigint(20) DEFAULT NULL,
|
||||
ADD KEY `FK_ltp_strategy` (`loan_transaction_strategy_id`),
|
||||
ADD CONSTRAINT `FK_ltp_strategy` FOREIGN KEY (`loan_transaction_strategy_id`) REFERENCES `ref_loan_transaction_processing_strategy` (`id`);
|
||||
|
||||
-- update ref table with out-of-the-box strategies
|
||||
Reference in New Issue
Block a user