FINERACT-1783: Customizeable LoanRepaymentScheduleTransactionProcessor

This commit is contained in:
Aleksandar Vidakovic
2022-11-01 14:08:02 +01:00
committed by Aleksandar Vidakovic
parent f2756b25bb
commit fc895fce05
99 changed files with 2015 additions and 2547 deletions
@@ -61,6 +61,15 @@ fineract.events.external.producer.jms.broker-url=${FINERACT_EXTERNAL_EVENTS_PROD
fineract.idempotency-key-header-name=${FINERACT_IDEMPOTENCY_KEY_HEADER_NAME:Idempotency-Key}
fineract.loan.transactionprocessor.creocore.enabled=${FINERACT_LOAN_TRANSACTIONPROCESSOR_CREOCORE_ENABLED:true}
fineract.loan.transactionprocessor.early-repayment.enabled=${FINERACT_LOAN_TRANSACTIONPROCESSOR_EARLY_REPAYMENT_ENABLED:true}
fineract.loan.transactionprocessor.mifos-standard.enabled=${FINERACT_LOAN_TRANSACTIONPROCESSOR_MIFOS_STANDARD_ENABLED:true}
fineract.loan.transactionprocessor.heavensfamily.enabled=${FINERACT_LOAN_TRANSACTIONPROCESSOR_HEAVENSFAMILY_ENABLED:true}
fineract.loan.transactionprocessor.interest-principal-penalties-fees.enabled=${FINERACT_LOAN_TRANSACTIONPROCESSOR_INTEREST_PRINCIPAL_PENALTIES_FEES_ENABLED:true}
fineract.loan.transactionprocessor.principal-interest-penalties-fees.enabled=${FINERACT_LOAN_TRANSACTIONPROCESSOR_PRINCIPAL_INTEREST_PENALTIES_FEES_ENABLED:true}
fineract.loan.transactionprocessor.rbi-india.enabled=${FINERACT_LOAN_TRANSACTIONPROCESSOR_RBI_INDIA_ENABLED:true}
fineract.loan.transactionprocessor.error-not-found-fail=${FINERACT_LOAN_TRANSACTIONPROCESSOR_ERROR_NOT_FOUND_FAIL:true}
# Logging pattern for the console
logging.pattern.console=${CONSOLE_LOG_PATTERN:%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(%replace([%X{correlationId}]){'\\[\\]', ''}) %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}}
@@ -83,4 +83,5 @@
<include file="parts/0061_add_idempotency_key_to_command_source.xml" relativeToChangelogFile="true"/>
<include file="parts/0062_add_fraud_attribute_to_loan.xml" relativeToChangelogFile="true"/>
<include file="parts/0063_add_permissions_for_external_event_configuration.xml" relativeToChangelogFile="true"/>
<include file="parts/0064_refactor_loan_transaction_strategy.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
<changeSet author="fineract" id="1">
<addColumn tableName="m_loan">
<column defaultValue="-" name="loan_transaction_strategy_code" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column defaultValue="-" name="loan_transaction_strategy_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
</addColumn>
<update tableName="m_loan">
<column name="loan_transaction_strategy_code" value="mifos-standard-strategy" />
<column name="loan_transaction_strategy_name" value="Penalties, Fees, Interest, Principal order" />
<where>loan_transaction_strategy_id = 1</where>
</update>
<update tableName="m_loan">
<column name="loan_transaction_strategy_code" value="heavensfamily-strategy" />
<column name="loan_transaction_strategy_name" value="HeavensFamily Unique" />
<where>loan_transaction_strategy_id = 2</where>
</update>
<update tableName="m_loan">
<column name="loan_transaction_strategy_code" value="creocore-strategy" />
<column name="loan_transaction_strategy_name" value="Creocore Unique" />
<where>loan_transaction_strategy_id = 3</where>
</update>
<update tableName="m_loan">
<column name="loan_transaction_strategy_code" value="rbi-india-strategy" />
<column name="loan_transaction_strategy_name" value="Overdue/Due Fee/Int,Principal" />
<where>loan_transaction_strategy_id = 4</where>
</update>
<update tableName="m_loan">
<column name="loan_transaction_strategy_code" value="principal-interest-penalties-fees-order-strategy" />
<column name="loan_transaction_strategy_name" value="Principal, Interest, Penalties, Fees Order" />
<where>loan_transaction_strategy_id = 5</where>
</update>
<update tableName="m_loan">
<column name="loan_transaction_strategy_code" value="interest-principal-penalties-fees-order-strategy" />
<column name="loan_transaction_strategy_name" value="Interest, Principal, Penalties, Fees Order" />
<where>loan_transaction_strategy_id = 6</where>
</update>
<update tableName="m_loan">
<column name="loan_transaction_strategy_code" value="early-repayment-strategy" />
<column name="loan_transaction_strategy_name" value="Early Repayment Strategy" />
<where>loan_transaction_strategy_id = 7</where>
</update>
<dropForeignKeyConstraint baseTableName="m_loan" constraintName="FK_loan_ltp_strategy" />
<!--
<dropColumn tableName="m_loan_product" columnName="loan_transaction_strategy_id" />
-->
</changeSet>
<changeSet author="fineract" id="2">
<addColumn tableName="m_product_loan">
<column defaultValue="-" name="loan_transaction_strategy_code" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
<column defaultValue="-" name="loan_transaction_strategy_name" type="VARCHAR(100)">
<constraints nullable="false"/>
</column>
</addColumn>
<update tableName="m_product_loan">
<column name="loan_transaction_strategy_code" value="mifos-standard-strategy" />
<column name="loan_transaction_strategy_name" value="Penalties, Fees, Interest, Principal order" />
<where>loan_transaction_strategy_id = 1</where>
</update>
<update tableName="m_product_loan">
<column name="loan_transaction_strategy_code" value="heavensfamily-strategy" />
<column name="loan_transaction_strategy_name" value="HeavensFamily Unique" />
<where>loan_transaction_strategy_id = 2</where>
</update>
<update tableName="m_product_loan">
<column name="loan_transaction_strategy_code" value="creocore-strategy" />
<column name="loan_transaction_strategy_name" value="Creocore Unique" />
<where>loan_transaction_strategy_id = 3</where>
</update>
<update tableName="m_product_loan">
<column name="loan_transaction_strategy_code" value="rbi-india-strategy" />
<column name="loan_transaction_strategy_name" value="Overdue/Due Fee/Int,Principal" />
<where>loan_transaction_strategy_id = 4</where>
</update>
<update tableName="m_product_loan">
<column name="loan_transaction_strategy_code" value="principal-interest-penalties-fees-order-strategy" />
<column name="loan_transaction_strategy_name" value="Principal, Interest, Penalties, Fees Order" />
<where>loan_transaction_strategy_id = 5</where>
</update>
<update tableName="m_product_loan">
<column name="loan_transaction_strategy_code" value="interest-principal-penalties-fees-order-strategy" />
<column name="loan_transaction_strategy_name" value="Interest, Principal, Penalties, Fees Order" />
<where>loan_transaction_strategy_id = 6</where>
</update>
<update tableName="m_product_loan">
<column name="loan_transaction_strategy_code" value="early-repayment-strategy" />
<column name="loan_transaction_strategy_name" value="Early Repayment Strategy" />
<where>loan_transaction_strategy_id = 7</where>
</update>
<dropForeignKeyConstraint baseTableName="m_product_loan" constraintName="FK_ltp_strategy" />
<!--
<dropColumn tableName="m_product_loan" columnName="loan_transaction_strategy_id" />
-->
</changeSet>
<changeSet author="fineract" id="3">
<renameColumn tableName="m_product_loan_configurable_attributes" oldColumnName="loan_transaction_strategy_id" newColumnName="loan_transaction_strategy_code" columnDataType="BOOLEAN" />
</changeSet>
<!--
<changeSet author="fineract" id="4">
<dropTable tableName="ref_loan_transaction_processing_strategy" />
</changeSet>
-->
</databaseChangeLog>
@@ -2266,7 +2266,6 @@ CREATE TABLE IF NOT EXISTS `m_loan` (
KEY `FKB6F935D87179A0CB` (`client_id`),
KEY `FKB6F935D8C8D4B434` (`product_id`),
KEY `FK7C885877240145` (`fund_id`),
KEY `FK_loan_ltp_strategy` (`loan_transaction_strategy_id`),
KEY `FK_m_loan_m_staff` (`loan_officer_id`),
KEY `group_id` (`group_id`),
KEY `FK_m_loanpurpose_codevalue` (`loanpurpose_cv_id`),
@@ -2284,7 +2283,6 @@ CREATE TABLE IF NOT EXISTS `m_loan` (
CONSTRAINT `FK_approvedon_userid` FOREIGN KEY (`approvedon_userid`) REFERENCES `m_appuser` (`id`),
CONSTRAINT `FK_closedon_userid` FOREIGN KEY (`closedon_userid`) REFERENCES `m_appuser` (`id`),
CONSTRAINT `FK_disbursedon_userid` FOREIGN KEY (`disbursedon_userid`) REFERENCES `m_appuser` (`id`),
CONSTRAINT `FK_loan_ltp_strategy` FOREIGN KEY (`loan_transaction_strategy_id`) REFERENCES `ref_loan_transaction_processing_strategy` (`id`),
CONSTRAINT `FK_m_loan_m_staff` FOREIGN KEY (`loan_officer_id`) REFERENCES `m_staff` (`id`),
CONSTRAINT `FK_m_loanpurpose_codevalue` FOREIGN KEY (`loanpurpose_cv_id`) REFERENCES `m_code_value` (`id`),
CONSTRAINT `FK_rejectedon_userid` FOREIGN KEY (`rejectedon_userid`) REFERENCES `m_appuser` (`id`),
@@ -3971,9 +3969,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan` (
UNIQUE KEY `unq_short_name` (`short_name`),
UNIQUE KEY `external_id_UNIQUE` (`external_id`),
KEY `FKA6A8A7D77240145` (`fund_id`),
KEY `FK_ltp_strategy` (`loan_transaction_strategy_id`),
CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`),
CONSTRAINT `FK_ltp_strategy` FOREIGN KEY (`loan_transaction_strategy_id`) REFERENCES `ref_loan_transaction_processing_strategy` (`id`)
CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4;
-- Dumping data for table fineract_default.m_product_loan: ~0 rows (approximately)
@@ -5494,30 +5490,6 @@ INSERT INTO `ppi_scores` (`id`, `score_from`, `score_to`) VALUES
/*!40000 ALTER TABLE `ppi_scores` ENABLE KEYS */;
-- Dumping structure for table fineract_default.ref_loan_transaction_processing_strategy
DROP TABLE IF EXISTS `ref_loan_transaction_processing_strategy`;
CREATE TABLE IF NOT EXISTS `ref_loan_transaction_processing_strategy` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`code` varchar(100) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`sort_order` INT DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ltp_strategy_code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=UTF8MB4;
-- Dumping data for table fineract_default.ref_loan_transaction_processing_strategy: ~7 rows (approximately)
/*!40000 ALTER TABLE `ref_loan_transaction_processing_strategy` DISABLE KEYS */;
INSERT INTO `ref_loan_transaction_processing_strategy` (`id`, `code`, `name`, `sort_order`) VALUES
(1, 'mifos-standard-strategy', 'Penalties, Fees, Interest, Principal order', 1),
(2, 'heavensfamily-strategy', 'HeavensFamily Unique', 6),
(3, 'creocore-strategy', 'Creocore Unique', 7),
(4, 'rbi-india-strategy', 'Overdue/Due Fee/Int,Principal', 2),
(5, 'principal-interest-penalties-fees-order-strategy', 'Principal, Interest, Penalties, Fees Order', 3),
(6, 'interest-principal-penalties-fees-order-strategy', 'Interest, Principal, Penalties, Fees Order', 4),
(7, 'early-repayment-strategy', 'Early Repayment Strategy', 5);
/*!40000 ALTER TABLE `ref_loan_transaction_processing_strategy` ENABLE KEYS */;
-- Dumping structure for table fineract_default.rpt_sequence
DROP TABLE IF EXISTS `rpt_sequence`;
CREATE TABLE IF NOT EXISTS `rpt_sequence` (
@@ -2406,7 +2406,6 @@ CREATE TABLE IF NOT EXISTS `m_loan` (
KEY `FKB6F935D87179A0CB` (`client_id`),
KEY `FKB6F935D8C8D4B434` (`product_id`),
KEY `FK7C885877240145` (`fund_id`),
KEY `FK_loan_ltp_strategy` (`loan_transaction_strategy_id`),
KEY `FK_m_loan_m_staff` (`loan_officer_id`),
KEY `group_id` (`group_id`),
KEY `FK_m_loanpurpose_codevalue` (`loanpurpose_cv_id`),
@@ -2424,7 +2423,6 @@ CREATE TABLE IF NOT EXISTS `m_loan` (
CONSTRAINT `FK_approvedon_userid` FOREIGN KEY (`approvedon_userid`) REFERENCES `m_appuser` (`id`),
CONSTRAINT `FK_closedon_userid` FOREIGN KEY (`closedon_userid`) REFERENCES `m_appuser` (`id`),
CONSTRAINT `FK_disbursedon_userid` FOREIGN KEY (`disbursedon_userid`) REFERENCES `m_appuser` (`id`),
CONSTRAINT `FK_loan_ltp_strategy` FOREIGN KEY (`loan_transaction_strategy_id`) REFERENCES `ref_loan_transaction_processing_strategy` (`id`),
CONSTRAINT `FK_m_loan_m_staff` FOREIGN KEY (`loan_officer_id`) REFERENCES `m_staff` (`id`),
CONSTRAINT `FK_m_loanpurpose_codevalue` FOREIGN KEY (`loanpurpose_cv_id`) REFERENCES `m_code_value` (`id`),
CONSTRAINT `FK_rejectedon_userid` FOREIGN KEY (`rejectedon_userid`) REFERENCES `m_appuser` (`id`),
@@ -4104,7 +4102,7 @@ INSERT INTO `m_portfolio_command_source` (`id`, `action_name`, `entity_name`, `o
(24, 'CREATE', 'USER', 1, NULL, NULL, NULL, NULL, '/users/template', 5, NULL, '{"sendPasswordToEmail":true,"officeId":1,"username":"janej","firstname":"Jane","lastname":"J","email":"janej@123.com","roles":["1"]}', 1, '2014-03-07 20:07:48', NULL, NULL, 1, NULL, NULL),
(25, 'CREATE', 'STAFF', 3, NULL, NULL, NULL, NULL, '/staff/template', 3, NULL, '{"isLoanOfficer":true,"officeId":3,"firstname":"John","lastname":"K"}', 1, '2014-03-07 20:08:28', NULL, NULL, 1, NULL, NULL),
(26, 'CREATE', 'FUND', NULL, NULL, NULL, NULL, NULL, '/funds/template', 1, NULL, '{"name":"Loan from Central Bank"}', 1, '2014-03-10 10:11:50', NULL, NULL, 1, NULL, NULL),
(27, 'CREATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/template', 1, NULL, '{"currencyCode":"USD","includeInBorrowerCycle":"false","useBorrowerCycle":"false","digitsAfterDecimal":"2","inMultiplesOf":"0","repaymentFrequencyType":1,"interestRateFrequencyType":3,"amortizationType":1,"interestType":1,"interestCalculationPeriodType":1,"transactionProcessingStrategyId":1,"principalVariationsForBorrowerCycle":[],"interestRateVariationsForBorrowerCycle":[],"numberOfRepaymentVariationsForBorrowerCycle":[],"multiDisburseLoan":false,"fundSourceAccountId":31,"loanPortfolioAccountId":32,"transfersInSuspenseAccountId":33,"interestOnLoanAccountId":36,"incomeFromFeeAccountId":37,"incomeFromPenaltyAccountId":38,"writeOffAccountId":41,"overpaymentLiabilityAccountId":30,"accountingRule":"2","name":"Income Generating Loan","shortName":"IGL","fundId":1,"minPrincipal":"10000","principal":"10000","maxPrincipal":"10000","minNumberOfRepayments":"25","numberOfRepayments":"25","maxNumberOfRepayments":"25","repaymentEvery":"1","minInterestRatePerPeriod":"26","interestRatePerPeriod":"26","maxInterestRatePerPeriod":"26","paymentChannelToFundSourceMappings":[],"feeToIncomeAccountMappings":[],"penaltyToIncomeAccountMappings":[],"charges":[],"dateFormat":"dd MMMM yyyy","locale":"en","startDate":"01 January 2010"}', 1, '2014-03-10 10:16:39', NULL, NULL, 1, NULL, NULL),
(27, 'CREATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/template', 1, NULL, '{"currencyCode":"USD","includeInBorrowerCycle":"false","useBorrowerCycle":"false","digitsAfterDecimal":"2","inMultiplesOf":"0","repaymentFrequencyType":1,"interestRateFrequencyType":3,"amortizationType":1,"interestType":1,"interestCalculationPeriodType":1,"transactionProcessingStrategyCode":"mifos-standard-strategy","principalVariationsForBorrowerCycle":[],"interestRateVariationsForBorrowerCycle":[],"numberOfRepaymentVariationsForBorrowerCycle":[],"multiDisburseLoan":false,"fundSourceAccountId":31,"loanPortfolioAccountId":32,"transfersInSuspenseAccountId":33,"interestOnLoanAccountId":36,"incomeFromFeeAccountId":37,"incomeFromPenaltyAccountId":38,"writeOffAccountId":41,"overpaymentLiabilityAccountId":30,"accountingRule":"2","name":"Income Generating Loan","shortName":"IGL","fundId":1,"minPrincipal":"10000","principal":"10000","maxPrincipal":"10000","minNumberOfRepayments":"25","numberOfRepayments":"25","maxNumberOfRepayments":"25","repaymentEvery":"1","minInterestRatePerPeriod":"26","interestRatePerPeriod":"26","maxInterestRatePerPeriod":"26","paymentChannelToFundSourceMappings":[],"feeToIncomeAccountMappings":[],"penaltyToIncomeAccountMappings":[],"charges":[],"dateFormat":"dd MMMM yyyy","locale":"en","startDate":"01 January 2010"}', 1, '2014-03-10 10:16:39', NULL, NULL, 1, NULL, NULL),
(28, 'CREATE', 'SAVINGSPRODUCT', NULL, NULL, NULL, NULL, NULL, '/savingsproducts/template', 1, NULL, '{"currencyCode":"USD","digitsAfterDecimal":2,"interestCompoundingPeriodType":1,"interestPostingPeriodType":4,"interestCalculationType":1,"interestCalculationDaysInYearType":365,"savingsReferenceAccountId":31,"overdraftPortfolioControlId":32,"savingsControlAccountId":30,"incomeFromFeeAccountId":36,"incomeFromPenaltyAccountId":37,"incomeFromInterestId":38,"interestOnSavingsAccountId":41,"writeOffAccountId":42,"accountingRule":"2","name":"Voluntary savings","shortName":"VS","description":"Save money","inMultiplesOf":"0","nominalAnnualInterestRate":"9.5","minRequiredOpeningBalance":"1000","lockinPeriodFrequency":"1","lockinPeriodFrequencyType":1,"withdrawalFeeForTransfers":"false","paymentChannelToFundSourceMappings":[],"feeToIncomeAccountMappings":[],"penaltyToIncomeAccountMappings":[],"charges":[],"locale":"en","transfersInSuspenseAccountId":30}', 1, '2014-03-10 10:21:16', NULL, NULL, 1, NULL, NULL),
(29, 'UPDATE', 'SAVINGSPRODUCT', NULL, NULL, NULL, NULL, NULL, '/savingsproducts/1', 1, NULL, '{"shortName":"VS","penaltyToIncomeAccountMappings":"[]","paymentChannelToFundSourceMappings":"[]","feeToIncomeAccountMappings":"[]"}', 1, '2014-03-10 10:21:51', NULL, NULL, 1, NULL, NULL),
(30, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 10, NULL, '{"name":"Cattle Rearing","position":"104"}', 1, '2014-03-10 10:27:02', NULL, NULL, 1, NULL, NULL),
@@ -4145,7 +4143,7 @@ INSERT INTO `m_portfolio_command_source` (`id`, `action_name`, `entity_name`, `o
(65, 'UPDATE', 'GLACCOUNT', NULL, NULL, NULL, NULL, NULL, '/glaccounts/2', 2, NULL, '{"usage":1}', 1, '2014-05-01 16:25:56', NULL, NULL, 1, NULL, NULL),
(66, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0,"penaltyToIncomeAccountMappings":"[]","paymentChannelToFundSourceMappings":"[]","feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:26:06', NULL, NULL, 1, NULL, NULL),
(67, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0,"overpaymentLiabilityAccountId":2,"penaltyToIncomeAccountMappings":"[]","paymentChannelToFundSourceMappings":"[]","transfersInSuspenseAccountId":17,"feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:26:37', NULL, NULL, 1, NULL, NULL),
(68, 'CREATE', 'LOAN', 2, NULL, 8, 1, NULL, '/loans', 1, NULL, '{"clientId":"8","productId":1,"disbursementData":[],"fundId":1,"principal":10000,"loanTermFrequency":25,"loanTermFrequencyType":1,"numberOfRepayments":25,"repaymentEvery":1,"repaymentFrequencyType":1,"interestRatePerPeriod":26,"amortizationType":1,"interestType":1,"interestCalculationPeriodType":1,"transactionProcessingStrategyId":1,"locale":"en","dateFormat":"dd MMMM yyyy","loanType":"individual","expectedDisbursementDate":"16 June 2014","submittedOnDate":"02 June 2014","charges":[{"chargeId":1,"amount":500}]}', 1, '2014-06-11 09:17:45', NULL, NULL, 1, NULL, NULL),
(68, 'CREATE', 'LOAN', 2, NULL, 8, 1, NULL, '/loans', 1, NULL, '{"clientId":"8","productId":1,"disbursementData":[],"fundId":1,"principal":10000,"loanTermFrequency":25,"loanTermFrequencyType":1,"numberOfRepayments":25,"repaymentEvery":1,"repaymentFrequencyType":1,"interestRatePerPeriod":26,"amortizationType":1,"interestType":1,"interestCalculationPeriodType":1,"transactionProcessingStrategyCode":"mifos-standard-strategy","locale":"en","dateFormat":"dd MMMM yyyy","loanType":"individual","expectedDisbursementDate":"16 June 2014","submittedOnDate":"02 June 2014","charges":[{"chargeId":1,"amount":500}]}', 1, '2014-06-11 09:17:45', NULL, NULL, 1, NULL, NULL),
(69, 'APPROVE', 'LOAN', 2, NULL, 8, 1, NULL, '/loans/1', 1, NULL, '{"status":{"id":200,"code":"loanStatusType.approved","value":"Approved","pendingApproval":false,"waitingForDisbursal":true,"active":false,"closedObligationsMet":false,"closedWrittenOff":false,"closedRescheduled":false,"closed":false,"overpaid":false},"locale":"en","dateFormat":"dd MMMM yyyy","approvedOnDate":"11 June 2014"}', 1, '2014-06-11 09:18:16', NULL, NULL, 1, NULL, NULL),
(70, 'CREATE', 'FINANCIALACTIVITYACCOUNT', NULL, NULL, NULL, NULL, NULL, '/organizationglaccounts/template', 2, NULL, '{"financialActivityId":100,"glAccountId":33}', 1, '2014-06-16 16:54:20', NULL, NULL, 1, NULL, NULL),
(71, 'UPDATE', 'FINANCIALACTIVITYACCOUNT', NULL, NULL, NULL, NULL, NULL, '/organizationglaccounts/2', 2, NULL, '{"glAccountId":32}', 1, '2014-06-16 16:57:17', NULL, NULL, 1, NULL, NULL),
@@ -4216,9 +4214,7 @@ CREATE TABLE IF NOT EXISTS `m_product_loan` (
UNIQUE KEY `unq_short_name` (`short_name`),
UNIQUE KEY `external_id_UNIQUE` (`external_id`),
KEY `FKA6A8A7D77240145` (`fund_id`),
KEY `FK_ltp_strategy` (`loan_transaction_strategy_id`),
CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`),
CONSTRAINT `FK_ltp_strategy` FOREIGN KEY (`loan_transaction_strategy_id`) REFERENCES `ref_loan_transaction_processing_strategy` (`id`)
CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4;
-- Dumping data for table mifostenant-reference.m_product_loan: ~1 rows (approximately)
@@ -5751,30 +5747,6 @@ INSERT INTO `ppi_scores` (`id`, `score_from`, `score_to`) VALUES
/*!40000 ALTER TABLE `ppi_scores` ENABLE KEYS */;
-- Dumping structure for table mifostenant-reference.ref_loan_transaction_processing_strategy
DROP TABLE IF EXISTS `ref_loan_transaction_processing_strategy`;
CREATE TABLE IF NOT EXISTS `ref_loan_transaction_processing_strategy` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`code` varchar(100) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`sort_order` INT DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ltp_strategy_code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=UTF8MB4;
-- Dumping data for table mifostenant-reference.ref_loan_transaction_processing_strategy: ~7 rows (approximately)
/*!40000 ALTER TABLE `ref_loan_transaction_processing_strategy` DISABLE KEYS */;
INSERT INTO `ref_loan_transaction_processing_strategy` (`id`, `code`, `name`, `sort_order`) VALUES
(1, 'mifos-standard-strategy', 'Penalties, Fees, Interest, Principal order', 1),
(2, 'heavensfamily-strategy', 'HeavensFamily Unique', 6),
(3, 'creocore-strategy', 'Creocore Unique', 7),
(4, 'rbi-india-strategy', 'Overdue/Due Fee/Int,Principal', 2),
(5, 'principal-interest-penalties-fees-order-strategy', 'Principal, Interest, Penalties, Fees Order', 3),
(6, 'interest-principal-penalties-fees-order-strategy', 'Interest, Principal, Penalties, Fees Order', 4),
(7, 'early-repayment-strategy', 'Early Repayment Strategy', 5);
/*!40000 ALTER TABLE `ref_loan_transaction_processing_strategy` ENABLE KEYS */;
-- Dumping structure for table mifostenant-reference.rpt_sequence
DROP TABLE IF EXISTS `rpt_sequence`;
CREATE TABLE IF NOT EXISTS `rpt_sequence` (
@@ -4740,7 +4740,7 @@ Content-Type: application/json Request Body:
\"amortizationType\": 1,
\"interestType\": 0,
\"interestCalculationPeriodType\": 1,
\"transactionProcessingStrategyId\": 1,
\"transactionProcessingStrategyCode\": \"mifos-standard-strategy\",
\"expectedDisbursementDate\": \"10 Jun 2013\",
\"submittedOnDate\": \"10 Jun 2013\"
}"
@@ -10339,7 +10339,7 @@ GET https://DomainName/fineract-provider/api/v1/groups/{groupId}/glimaccounts
</td>
</tr>
<tr class=alt>
<td>transactionProcessingStrategyId</td>
<td>transactionProcessingStrategyCode</td>
</tr>
<tr>
<td class=fielddesc>
@@ -10541,7 +10541,7 @@ GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1&
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"timeline": {
"expectedDisbursementDate": [
2013,
@@ -10973,7 +10973,7 @@ GET https://DomainName/api/v1/loans/{loanId}
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"timeline": {
"submittedOnDate": [
2012,
@@ -11265,7 +11265,7 @@ GET https://DomainName/fineract-provider/api/v1/loans
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"timeline": {
"submittedOnDate": [
2012,
@@ -11417,7 +11417,7 @@ No Request Body:
"interestCalculationPeriodType": 0,
"amortizationType": 1,
"expectedDisbursementDate": "04 March 2014",
"transactionProcessingStrategyId": 1
"transactionProcessingStrategyCode": "mifos-standard-strategy"
}
</code>
<code class="method-response">
@@ -11449,7 +11449,7 @@ No Request Body:
repaymentFrequencyType, interestRatePerPeriod,
amortizationType, interestType,
interestCalculationPeriodType, expectedDisbursementDate,
transactionProcessingStrategyId</td>
transactionProcessingStrategyCode</td>
</tr>
</table>
</div>
@@ -11476,7 +11476,7 @@ Request Body:
"interestType": 0,
"interestCalculationPeriodType": 1,
"expectedDisbursementDate": "20 September 2011",
"transactionProcessingStrategyId": 2
"transactionProcessingStrategyCode": "mifos-standard-strategy"
}
</code>
<code class="method-response">
@@ -11598,7 +11598,7 @@ Request Body:
loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery,
repaymentFrequencyType, interestRatePerPeriod,
amortizationType, interestType,
interestCalculationPeriodType, transactionProcessingStrategyId,
interestCalculationPeriodType, transactionProcessingStrategyCode,
expectedDisbursementDate, submittedOnDate, loanType</td>
</tr>
</table>
@@ -11663,7 +11663,7 @@ Request Body:
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"expectedDisbursementDate": "10 Jun 2013",
"submittedOnDate": "10 Jun 2013",
"linkAccountId" : "1",
@@ -12222,7 +12222,7 @@ Content-Type: application/json
</tr>
<tr class=alt>
<td>interestRatePerPeriod, expectedDisbursementDate, clientId, groupId, productId, totalLoan, loanType, interestType,
principal, charges, transactionProcessingStrategyId, submittedOnDate, amortizationType, repaymentFrequencyType,
principal, charges, transactionProcessingStrategyCode, submittedOnDate, amortizationType, repaymentFrequencyType,
loanTermFrequencyType, loanTermFrequency, repaymentEvery, numberOfRepayments, interestCalculationPeriodType,
isParentAccount, locale,dateFormat</td>
</tr>
@@ -12250,7 +12250,7 @@ Request Body:
"locale":"en_GB",
"principal":"1000.00",
"charges":[],
"transactionProcessingStrategyId":"1",
"transactionProcessingStrategyCode":"mifos-standard-strategy",
"submittedOnDate":"10 June 2020",
"amortizationType":"1",
"repaymentFrequencyType":"2",
@@ -15740,7 +15740,7 @@ Request Body:
<tr class=alt>
<td>transactionProcessingStrategyId</td>
<td>transactionProcessingStrategyCode</td>
</tr>
<tr>
<td class=fielddesc>
@@ -15986,7 +15986,7 @@ GET https://DomainName/api/v1/loanproducts
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"transactionProcessingStrategyName": "Mifos style",
"principalVariationsForBorrowerCycle": [],
"interestRateVariationsForBorrowerCycle": [],
@@ -16989,7 +16989,7 @@ GET https://DomainName/api/v1/loanproducts/{productId}
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"transactionProcessingStrategyName": "Mifos style",
"charges": [],
"principalVariationsForBorrowerCycle": [
@@ -17162,7 +17162,7 @@ GET https://DomainName/api/v1/loanproducts/{productId}
<td>name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal,
numberOfRepayments, repaymentEvery, repaymentFrequencyType,
interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType,
interestCalculationPeriodType, transactionProcessingStrategyId,
interestCalculationPeriodType, transactionProcessingStrategyCode,
accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType</td>
</tr>
</table>
@@ -17277,7 +17277,7 @@ Request Body:
"amortizationType":1,
"interestType":0,
"interestCalculationPeriodType":1,
"transactionProcessingStrategyId":1,
"transactionProcessingStrategyCode":"mifos-standard-strategy",
"principalVariationsForBorrowerCycle":[],
"interestRateVariationsForBorrowerCycle":[],
"numberOfRepaymentVariationsForBorrowerCycle":[
@@ -17299,7 +17299,7 @@ Request Body:
"allowAttributeOverrides":
{amortizationType : true,
interestType : true,
transactionProcessingStrategyId : false,
transactionProcessingStrategyCode : false,
interestCalculationPeriodType : true,
inArrearsTolerance : false,
repaymentEvery : true,
@@ -17355,7 +17355,7 @@ Request Body:
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
@@ -17422,7 +17422,7 @@ Request Body:
"numberOfRepayments": "12",
"repaymentEvery": "1",
"repaymentFrequencyType": 2,
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"interestRatePerPeriod": "1.75",
"interestRateFrequencyType": 2,
"amortizationType": 1,
@@ -47942,7 +47942,7 @@ GET https://DomainName/api/v1/self/loans/template?templateType=individual&client
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"timeline": {
"expectedDisbursementDate": [
2013,
@@ -48192,7 +48192,7 @@ GET https://DomainName/api/v1/self/loans/template?templateType=individual&client
repaymentFrequencyType, interestRatePerPeriod,
amortizationType, interestType,
interestCalculationPeriodType, expectedDisbursementDate,
transactionProcessingStrategyId</td>
transactionProcessingStrategyCode</td>
</tr>
</table>
</div>
@@ -48219,7 +48219,7 @@ Request Body:
"interestType": 0,
"interestCalculationPeriodType": 1,
"expectedDisbursementDate": "20 September 2011",
"transactionProcessingStrategyId": 2
"transactionProcessingStrategyCode": "mifos-standard-strategy"
}
</code>
<code class="method-response">
@@ -48343,7 +48343,7 @@ Request Body:
loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery,
repaymentFrequencyType, interestRatePerPeriod,
amortizationType, interestType,
interestCalculationPeriodType, transactionProcessingStrategyId,
interestCalculationPeriodType, transactionProcessingStrategyCode,
expectedDisbursementDate, submittedOnDate, loanType</td>
</tr>
</table>
@@ -48400,7 +48400,7 @@ Request Body:
"amortizationType": 1,
"interestType": 0,
"interestCalculationPeriodType": 1,
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"expectedDisbursementDate": "10 Jun 2013",
"submittedOnDate": "10 Jun 2013",
"linkAccountId" : "1",
@@ -48553,7 +48553,7 @@ GET https://DomainName/api/v1/self/loans/{loanId}
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 2,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"timeline": {
"submittedOnDate": [
2012,
@@ -48722,7 +48722,7 @@ No Request Body:
"interestCalculationPeriodType": 0,
"amortizationType": 1,
"expectedDisbursementDate": "04 March 2014",
"transactionProcessingStrategyId": 1
"transactionProcessingStrategyCode": "mifos-standard-strategy"
}
</code>
<code class="method-response">
@@ -51635,7 +51635,7 @@ No Request Body:
<tr class=alt>
<td>transactionProcessingStrategyId</td>
<td>transactionProcessingStrategyCode</td>
</tr>
<tr>
<td class=fielddesc>
@@ -51929,7 +51929,7 @@ GET https://DomainName/api/v1/self/loanproducts/{productId}?clientId={clientId}
"code": "interestCalculationPeriodType.same.as.repayment.period",
"value": "Same as repayment period"
},
"transactionProcessingStrategyId": 1,
"transactionProcessingStrategyCode": "mifos-standard-strategy",
"transactionProcessingStrategyName": "Mifos style",
"charges": [],
"principalVariationsForBorrowerCycle": [