Merging Michael's changes around FD and RD
This commit is contained in:
+16
-4
@@ -16408,7 +16408,7 @@ Content-Type: application/json
|
||||
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
|
||||
<tr class=alt>
|
||||
<td>name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf,
|
||||
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule </td>
|
||||
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule, depositAmount </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
@@ -16421,7 +16421,7 @@ Content-Type: application/json
|
||||
<br/>
|
||||
<table class=matrixHeading>
|
||||
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Optional Fields</div></td></tr>
|
||||
<tr class=alt><td>lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts</tr>
|
||||
<tr class=alt><td>lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, minDepositAmount, maxDepositAmount</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="method-example">
|
||||
@@ -16451,6 +16451,9 @@ Request Body:
|
||||
"minDepositTermTypeId":1,
|
||||
"maxDepositTerm":5,
|
||||
"maxDepositTermTypeId":3,
|
||||
depositAmount: "10000",
|
||||
minDepositAmount: "100",
|
||||
maxDepositAmount: "1000000",
|
||||
"charts":[
|
||||
{
|
||||
"fromDate": "01 Jan 2014",
|
||||
@@ -16593,6 +16596,9 @@ Request Body:
|
||||
"code": "recurring.deposit.savingsPeriodFrequencyType.months",
|
||||
"value": "Months"
|
||||
},
|
||||
"minDepositAmount":100.00,
|
||||
"depositAmount":10000.00,
|
||||
"maxDepositAmount":1000000.00,
|
||||
"preClosurePenalApplicable":"true",
|
||||
"preClosurePenalInterest":"1.75",
|
||||
"preClosurePenalInterestOnType": {
|
||||
@@ -20733,7 +20739,7 @@ No Request Body:
|
||||
<br/>
|
||||
<table class=matrixHeading>
|
||||
<tr class="matrixHeadingBG"><td><div class="mifosXHeading2">Mandatory Fields</div></td></tr>
|
||||
<tr class=alt><td>clientId or groupId, productId, submittedOnDate, recurringDepositAmount, depositPeriod, depositPeriodFrequencyId, recurringDepositFrequency, recurringDepositFrequencyTypeId</td></tr>
|
||||
<tr class=alt><td>clientId or groupId, productId, submittedOnDate, recurringDepositAmount, depositPeriod, depositPeriodFrequencyId, recurringDepositFrequency, recurringDepositFrequencyTypeId, expectedFirstDepositOnDate</td></tr>
|
||||
</table>
|
||||
<br/>
|
||||
<table class=matrixHeading>
|
||||
@@ -20782,7 +20788,8 @@ Request Body:
|
||||
"depositPeriod":"6",
|
||||
"depositPeriodFrequencyId":"2",
|
||||
"accountNo": "RD000023",
|
||||
"externalId": "RD-23"
|
||||
"externalId": "RD-23",
|
||||
expectedFirstDepositOnDate: "02 April 2014"
|
||||
}
|
||||
</code>
|
||||
<p>Full request: accountNo provided (must be unique), remaining details override details from recurring deposit product (except currency).</p>
|
||||
@@ -21615,6 +21622,11 @@ Request Body:
|
||||
},
|
||||
"recurringDepositAmount": 100,
|
||||
"recurringDepositFrequency": 1,
|
||||
"expectedFirstDepositOnDate": [
|
||||
2014,
|
||||
4,
|
||||
2
|
||||
],
|
||||
"recurringDepositFrequencyType": {
|
||||
"id": 2,
|
||||
"code": "recurring.deposit.savingsPeriodFrequencyType.months",
|
||||
|
||||
+27
-18
@@ -9,8 +9,6 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Months;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -85,6 +83,7 @@ public class RecurringDepositTest {
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
todaysDate.add(Calendar.MONTH, 1);
|
||||
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
@@ -96,7 +95,7 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -157,6 +156,7 @@ public class RecurringDepositTest {
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
todaysDate.add(Calendar.MONTH, 1);
|
||||
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
@@ -183,7 +183,7 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -261,6 +261,7 @@ public class RecurringDepositTest {
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
todaysDate.add(Calendar.MONTH, 1);
|
||||
final String CLOSED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
@@ -277,7 +278,7 @@ public class RecurringDepositTest {
|
||||
this.responseSpec, recurringDepositProductId.toString());
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -327,8 +328,9 @@ public class RecurringDepositTest {
|
||||
|
||||
todaysDate = Calendar.getInstance();
|
||||
todaysDate.add(Calendar.MONTH, -1);
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
|
||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||
Assert.assertNotNull(clientId);
|
||||
@@ -337,14 +339,14 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
|
||||
todaysDate.add(Calendar.DATE, -1);
|
||||
SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
|
||||
HashMap modificationsHashMap = this.recurringDepositAccountHelper.updateRecurringDepositAccount(clientId.toString(),
|
||||
recurringDepositProductId.toString(), recurringDepositAccountId.toString(), VALID_FROM, VALID_TO, WHOLE_TERM, SUBMITTED_ON_DATE);
|
||||
recurringDepositProductId.toString(), recurringDepositAccountId.toString(), VALID_FROM, VALID_TO, WHOLE_TERM,
|
||||
SUBMITTED_ON_DATE);
|
||||
Assert.assertTrue(modificationsHashMap.containsKey("submittedOnDate"));
|
||||
|
||||
}
|
||||
@@ -367,6 +369,7 @@ public class RecurringDepositTest {
|
||||
todaysDate.add(Calendar.MONTH, -1);
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
|
||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||
@@ -376,7 +379,7 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -410,6 +413,7 @@ public class RecurringDepositTest {
|
||||
todaysDate.add(Calendar.MONTH, -1);
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String REJECTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
|
||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||
@@ -419,7 +423,7 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -451,6 +455,7 @@ public class RecurringDepositTest {
|
||||
todaysDate.add(Calendar.MONTH, -1);
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String WITHDRAWN_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
|
||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||
@@ -460,7 +465,7 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -490,6 +495,7 @@ public class RecurringDepositTest {
|
||||
todaysDate = Calendar.getInstance();
|
||||
todaysDate.add(Calendar.MONTH, -1);
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
|
||||
Integer clientId = ClientHelper.createClient(this.requestSpec, this.responseSpec);
|
||||
@@ -499,7 +505,7 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -536,6 +542,7 @@ public class RecurringDepositTest {
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String APPROVED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String ACTIVATION_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String MONTH_DAY = monthDayFormat.format(todaysDate.getTime());
|
||||
todaysDate.add(Calendar.MONTH, 1);
|
||||
final String DEPOSIT_DATE = dateFormat.format(todaysDate.getTime());
|
||||
@@ -547,7 +554,7 @@ public class RecurringDepositTest {
|
||||
Assert.assertNotNull(recurringDepositProductId);
|
||||
|
||||
Integer recurringDepositAccountId = applyForRecurringDepositApplication(clientId.toString(), recurringDepositProductId.toString(),
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM);
|
||||
VALID_FROM, VALID_TO, SUBMITTED_ON_DATE, WHOLE_TERM, EXPECTED_FIRST_DEPOSIT_ON_DATE);
|
||||
Assert.assertNotNull(recurringDepositAccountId);
|
||||
|
||||
HashMap recurringDepositAccountStatusHashMap = RecurringDepositAccountStatusChecker.getStatusOfRecurringDepositAccount(
|
||||
@@ -584,10 +591,12 @@ public class RecurringDepositTest {
|
||||
}
|
||||
|
||||
private Integer applyForRecurringDepositApplication(final String clientID, final String productID, final String validFrom,
|
||||
final String validTo, final String submittedOnDate, final String penalInterestType) {
|
||||
final String validTo, final String submittedOnDate, final String penalInterestType, final String expectedFirstDepositOnDate) {
|
||||
System.out.println("--------------------------------APPLYING FOR RECURRING DEPOSIT ACCOUNT --------------------------------");
|
||||
final String recurringDepositApplicationJSON = new RecurringDepositAccountHelper(this.requestSpec, this.responseSpec) //
|
||||
.withSubmittedOnDate(submittedOnDate).build(clientID, productID, validFrom, validTo, penalInterestType);
|
||||
final String recurringDepositApplicationJSON = new RecurringDepositAccountHelper(this.requestSpec, this.responseSpec)
|
||||
//
|
||||
.withSubmittedOnDate(submittedOnDate).withExpectedFirstDepositOnDate(expectedFirstDepositOnDate)
|
||||
.build(clientID, productID, validFrom, validTo, penalInterestType);
|
||||
return this.recurringDepositAccountHelper.applyRecurringDepositApplication(recurringDepositApplicationJSON, this.requestSpec,
|
||||
this.responseSpec);
|
||||
}
|
||||
|
||||
+22
-21
@@ -1,21 +1,14 @@
|
||||
package org.mifosplatform.integrationtests.common.recurringdeposit;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.mifosplatform.integrationtests.common.CommonConstants;
|
||||
import org.mifosplatform.integrationtests.common.Utils;
|
||||
import org.mifosplatform.integrationtests.common.accounting.Account;
|
||||
import org.mifosplatform.integrationtests.common.accounting.Account.AccountType;
|
||||
import org.mifosplatform.integrationtests.common.savings.SavingsApplicationTestBuilder;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.jayway.restassured.specification.RequestSpecification;
|
||||
@@ -63,18 +56,18 @@ public class RecurringDepositAccountHelper {
|
||||
private static final String DAYS_360 = "360";
|
||||
private static final String DAYS_365 = "365";
|
||||
|
||||
private String interestCompoundingPeriodType = MONTHLY;
|
||||
private String interestPostingPeriodType = MONTHLY;
|
||||
private String interestCalculationType = INTEREST_CALCULATION_USING_DAILY_BALANCE;
|
||||
private String lockinPeriodFrequency = "6";
|
||||
private String lockingPeriodFrequencyType = MONTHS;
|
||||
private String minDepositTerm = "6";
|
||||
private String minDepositTermTypeId = MONTHS;
|
||||
private String maxDepositTerm = "10";
|
||||
private String maxDepositTermTypeId = YEARS;
|
||||
private String inMultiplesOfDepositTerm = "2";
|
||||
private String inMultiplesOfDepositTermTypeId = MONTHS;
|
||||
private String preClosurePenalInterest = "2";
|
||||
private final String interestCompoundingPeriodType = MONTHLY;
|
||||
private final String interestPostingPeriodType = MONTHLY;
|
||||
private final String interestCalculationType = INTEREST_CALCULATION_USING_DAILY_BALANCE;
|
||||
private final String lockinPeriodFrequency = "6";
|
||||
private final String lockingPeriodFrequencyType = MONTHS;
|
||||
private final String minDepositTerm = "6";
|
||||
private final String minDepositTermTypeId = MONTHS;
|
||||
private final String maxDepositTerm = "10";
|
||||
private final String maxDepositTermTypeId = YEARS;
|
||||
private final String inMultiplesOfDepositTerm = "2";
|
||||
private final String inMultiplesOfDepositTermTypeId = MONTHS;
|
||||
private final String preClosurePenalInterest = "2";
|
||||
private final boolean preClosurePenalApplicable = true;
|
||||
private final boolean isActiveChart = true;
|
||||
private final String currencyCode = USD;
|
||||
@@ -86,6 +79,7 @@ public class RecurringDepositAccountHelper {
|
||||
private final String recurringDepositFrequencyTypeId = MONTHS;
|
||||
private final String recurringDepositAmount = "2000";
|
||||
private String submittedOnDate = "";
|
||||
private String expectedFirstDepositOnDate = "";
|
||||
|
||||
public String build(final String clientId, final String productId, final String validFrom, final String validTo,
|
||||
final String penalInterestType) {
|
||||
@@ -167,6 +161,7 @@ public class RecurringDepositAccountHelper {
|
||||
map.put("recurringDepositFrequency", this.recurringDepositFrequency);
|
||||
map.put("recurringDepositFrequencyTypeId", this.recurringDepositFrequencyTypeId);
|
||||
map.put("recurringDepositAmount", this.recurringDepositAmount);
|
||||
map.put("expectedFirstDepositOnDate", this.expectedFirstDepositOnDate);
|
||||
|
||||
String recurringDepositAccountJson = new Gson().toJson(map);
|
||||
System.out.println(recurringDepositAccountJson);
|
||||
@@ -215,8 +210,9 @@ public class RecurringDepositAccountHelper {
|
||||
todaysDate.add(Calendar.MONTH, -1);
|
||||
todaysDate.add(Calendar.DATE, -1);
|
||||
final String SUBMITTED_ON_DATE = dateFormat.format(todaysDate.getTime());
|
||||
final String recurringDepositApplicationJSON = new RecurringDepositAccountHelper(this.requestSpec, this.responseSpec) //
|
||||
.withSubmittedOnDate(submittedOnDate) //
|
||||
final String EXPECTED_FIRST_DEPOSIT_ON_ON_DATE = SUBMITTED_ON_DATE;
|
||||
final String recurringDepositApplicationJSON = new RecurringDepositAccountHelper(this.requestSpec, this.responseSpec)
|
||||
.withSubmittedOnDate(SUBMITTED_ON_DATE).withExpectedFirstDepositOnDate(EXPECTED_FIRST_DEPOSIT_ON_ON_DATE)
|
||||
.build(clientID, productID, validFrom, validTo, penalInterestType);
|
||||
|
||||
return Utils.performServerPut(this.requestSpec, this.responseSpec, RECURRING_DEPOSIT_ACCOUNT_URL + "/" + accountID + "?"
|
||||
@@ -425,4 +421,9 @@ public class RecurringDepositAccountHelper {
|
||||
return this;
|
||||
}
|
||||
|
||||
public RecurringDepositAccountHelper withExpectedFirstDepositOnDate(final String recurringDepositApplicationExpectedFirstDepositOnDate) {
|
||||
this.expectedFirstDepositOnDate = recurringDepositApplicationExpectedFirstDepositOnDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
+21
-22
@@ -1,18 +1,12 @@
|
||||
package org.mifosplatform.integrationtests.common.recurringdeposit;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.mifosplatform.integrationtests.common.CommonConstants;
|
||||
import org.mifosplatform.integrationtests.common.Utils;
|
||||
import org.mifosplatform.integrationtests.common.accounting.Account;
|
||||
import org.mifosplatform.integrationtests.common.accounting.Account.AccountType;
|
||||
import org.mifosplatform.integrationtests.common.savings.SavingsProductHelper;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.jayway.restassured.specification.RequestSpecification;
|
||||
@@ -56,23 +50,23 @@ public class RecurringDepositProductHelper {
|
||||
private static final String VOLUNTARY = "1";
|
||||
private static final String MANDATORY = "2";
|
||||
|
||||
private String name = Utils.randomNameGenerator("RECURRING_DEPOSIT_PRODUCT_", 6);
|
||||
private String shortName = Utils.randomNameGenerator("", 4);
|
||||
private String description = Utils.randomNameGenerator("", 20);
|
||||
private String interestCompoundingPeriodType = MONTHLY;
|
||||
private String interestPostingPeriodType = MONTHLY;
|
||||
private String interestCalculationType = INTEREST_CALCULATION_USING_DAILY_BALANCE;
|
||||
private final String name = Utils.randomNameGenerator("RECURRING_DEPOSIT_PRODUCT_", 6);
|
||||
private final String shortName = Utils.randomNameGenerator("", 4);
|
||||
private final String description = Utils.randomNameGenerator("", 20);
|
||||
private final String interestCompoundingPeriodType = MONTHLY;
|
||||
private final String interestPostingPeriodType = MONTHLY;
|
||||
private final String interestCalculationType = INTEREST_CALCULATION_USING_DAILY_BALANCE;
|
||||
private String accountingRule = NONE;
|
||||
private String lockinPeriodFrequency = "6";
|
||||
private String lockingPeriodFrequencyType = MONTHS;
|
||||
private String minDepositTerm = "6";
|
||||
private String minDepositTermTypeId = MONTHS;
|
||||
private String maxDepositTerm = "10";
|
||||
private String maxDepositTermTypeId = YEARS;
|
||||
private String inMultiplesOfDepositTerm = "2";
|
||||
private String inMultiplesOfDepositTermTypeId = MONTHS;
|
||||
private String preClosurePenalInterest = "2";
|
||||
private String preClosurePenalInterestOnTypeId = WHOLE_TERM;
|
||||
private final String lockinPeriodFrequency = "6";
|
||||
private final String lockingPeriodFrequencyType = MONTHS;
|
||||
private final String minDepositTerm = "6";
|
||||
private final String minDepositTermTypeId = MONTHS;
|
||||
private final String maxDepositTerm = "10";
|
||||
private final String maxDepositTermTypeId = YEARS;
|
||||
private final String inMultiplesOfDepositTerm = "2";
|
||||
private final String inMultiplesOfDepositTermTypeId = MONTHS;
|
||||
private final String preClosurePenalInterest = "2";
|
||||
private final String preClosurePenalInterestOnTypeId = WHOLE_TERM;
|
||||
private final boolean preClosurePenalApplicable = true;
|
||||
private final String currencyCode = USD;
|
||||
private final String interestCalculationDaysInYearType = DAYS_365;
|
||||
@@ -80,6 +74,8 @@ public class RecurringDepositProductHelper {
|
||||
private final String recurringDepositFrequencyTypeId = MONTHS;
|
||||
private final String recurringDepositFrequency = "1";
|
||||
private final String depositAmount = "100000";
|
||||
private final String minDepositAmount = "100";
|
||||
private final String maxDepositAmount = "1000000";
|
||||
private Account[] accountList = null;
|
||||
|
||||
public String build(final String validFrom, final String validTo) {
|
||||
@@ -160,6 +156,9 @@ public class RecurringDepositProductHelper {
|
||||
map.put("recurringDepositFrequencyTypeId", this.recurringDepositFrequencyTypeId);
|
||||
map.put("depositAmount", this.depositAmount);
|
||||
map.put("recurringDepositFrequency", this.recurringDepositFrequency);
|
||||
map.put("depositAmount", this.depositAmount);
|
||||
map.put("minDepositAmount", this.minDepositAmount);
|
||||
map.put("maxDepositAmount", this.maxDepositAmount);
|
||||
|
||||
if (this.accountingRule.equals(CASH_BASED)) {
|
||||
map.putAll(getAccountMappingForCashBased());
|
||||
|
||||
+3
-2
@@ -8,17 +8,18 @@ package org.mifosplatform.accounting.producttoaccountmapping.service;
|
||||
import java.util.Map;
|
||||
|
||||
import org.mifosplatform.infrastructure.core.api.JsonCommand;
|
||||
import org.mifosplatform.portfolio.savings.DepositAccountType;
|
||||
|
||||
public interface ProductToGLAccountMappingWritePlatformService {
|
||||
|
||||
void createLoanProductToGLAccountMapping(Long loanProductId, JsonCommand command);
|
||||
|
||||
void createSavingProductToGLAccountMapping(Long savingProductId, JsonCommand command);
|
||||
void createSavingProductToGLAccountMapping(Long savingProductId, JsonCommand command, DepositAccountType accountType);
|
||||
|
||||
Map<String, Object> updateLoanProductToGLAccountMapping(Long loanProductId, JsonCommand command, boolean accountingRuleChanged,
|
||||
int accountingRuleTypeId);
|
||||
|
||||
Map<String, Object> updateSavingsProductToGLAccountMapping(Long savingsProductId, JsonCommand command, boolean accountingRuleChanged,
|
||||
int accountingRuleTypeId);
|
||||
int accountingRuleTypeId, DepositAccountType accountType);
|
||||
|
||||
}
|
||||
+15
-9
@@ -20,6 +20,7 @@ import org.mifosplatform.accounting.common.AccountingRuleType;
|
||||
import org.mifosplatform.accounting.producttoaccountmapping.serialization.ProductToGLAccountMappingFromApiJsonDeserializer;
|
||||
import org.mifosplatform.infrastructure.core.api.JsonCommand;
|
||||
import org.mifosplatform.infrastructure.core.serialization.FromJsonHelper;
|
||||
import org.mifosplatform.portfolio.savings.DepositAccountType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -151,7 +152,7 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void createSavingProductToGLAccountMapping(final Long savingProductId, final JsonCommand command) {
|
||||
public void createSavingProductToGLAccountMapping(final Long savingProductId, final JsonCommand command, DepositAccountType accountType) {
|
||||
final JsonElement element = this.fromApiJsonHelper.parse(command.json());
|
||||
final Integer accountingRuleTypeId = this.fromApiJsonHelper.extractIntegerNamed(accountingRuleParamName, element,
|
||||
Locale.getDefault());
|
||||
@@ -165,9 +166,12 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc
|
||||
this.savingsProductToGLAccountMappingHelper.saveSavingsToAssetAccountMapping(element,
|
||||
SAVINGS_PRODUCT_ACCOUNTING_PARAMS.SAVINGS_REFERENCE.getValue(), savingProductId,
|
||||
CASH_ACCOUNTS_FOR_SAVINGS.SAVINGS_REFERENCE.getValue());
|
||||
this.savingsProductToGLAccountMappingHelper.saveSavingsToAssetAccountMapping(element,
|
||||
SAVINGS_PRODUCT_ACCOUNTING_PARAMS.OVERDRAFT_PORTFOLIO_CONTROL.getValue(), savingProductId,
|
||||
CASH_ACCOUNTS_FOR_SAVINGS.OVERDRAFT_PORTFOLIO_CONTROL.getValue());
|
||||
|
||||
if (!accountType.equals(DepositAccountType.RECURRING_DEPOSIT) && !accountType.equals(DepositAccountType.FIXED_DEPOSIT)) {
|
||||
this.savingsProductToGLAccountMappingHelper.saveSavingsToAssetAccountMapping(element,
|
||||
SAVINGS_PRODUCT_ACCOUNTING_PARAMS.OVERDRAFT_PORTFOLIO_CONTROL.getValue(), savingProductId,
|
||||
CASH_ACCOUNTS_FOR_SAVINGS.OVERDRAFT_PORTFOLIO_CONTROL.getValue());
|
||||
}
|
||||
|
||||
// income
|
||||
this.savingsProductToGLAccountMappingHelper.saveSavingsToIncomeAccountMapping(element,
|
||||
@@ -187,9 +191,11 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc
|
||||
SAVINGS_PRODUCT_ACCOUNTING_PARAMS.INTEREST_ON_SAVINGS.getValue(), savingProductId,
|
||||
CASH_ACCOUNTS_FOR_SAVINGS.INTEREST_ON_SAVINGS.getValue());
|
||||
|
||||
this.savingsProductToGLAccountMappingHelper.saveSavingsToExpenseAccountMapping(element,
|
||||
SAVINGS_PRODUCT_ACCOUNTING_PARAMS.LOSSES_WRITTEN_OFF.getValue(), savingProductId,
|
||||
CASH_ACCOUNTS_FOR_SAVINGS.LOSSES_WRITTEN_OFF.getValue());
|
||||
if (!accountType.equals(DepositAccountType.RECURRING_DEPOSIT) && !accountType.equals(DepositAccountType.FIXED_DEPOSIT)) {
|
||||
this.savingsProductToGLAccountMappingHelper.saveSavingsToExpenseAccountMapping(element,
|
||||
SAVINGS_PRODUCT_ACCOUNTING_PARAMS.LOSSES_WRITTEN_OFF.getValue(), savingProductId,
|
||||
CASH_ACCOUNTS_FOR_SAVINGS.LOSSES_WRITTEN_OFF.getValue());
|
||||
}
|
||||
|
||||
// liability
|
||||
this.savingsProductToGLAccountMappingHelper.saveSavingsToLiabilityAccountMapping(element,
|
||||
@@ -243,7 +249,7 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateSavingsProductToGLAccountMapping(final Long savingsProductId, final JsonCommand command,
|
||||
final boolean accountingRuleChanged, final int accountingRuleTypeId) {
|
||||
final boolean accountingRuleChanged, final int accountingRuleTypeId, final DepositAccountType accountType) {
|
||||
/***
|
||||
* Variable tracks all accounting mapping properties that have been
|
||||
* updated
|
||||
@@ -259,7 +265,7 @@ public class ProductToGLAccountMappingWritePlatformServiceImpl implements Produc
|
||||
if (accountingRuleChanged) {
|
||||
this.deserializer.validateForSavingsProductCreate(command.json());
|
||||
this.savingsProductToGLAccountMappingHelper.deleteSavingsProductToGLAccountMapping(savingsProductId);
|
||||
createSavingProductToGLAccountMapping(savingsProductId, command);
|
||||
createSavingProductToGLAccountMapping(savingsProductId, command, accountType);
|
||||
changes = this.savingsProductToGLAccountMappingHelper.populateChangesForNewSavingsProductToGLAccountMappingCreation(element,
|
||||
accountingRuleType);
|
||||
}/*** else examine and update individual changes ***/
|
||||
|
||||
+5
-3
@@ -211,11 +211,13 @@ public class InterestRateChartSlabFields {
|
||||
}
|
||||
|
||||
public boolean isAmountBetween(final BigDecimal depositAmount) {
|
||||
boolean returnValue = true;
|
||||
if (amountRangeFrom != null && amountRangeTo != null) {
|
||||
return depositAmount.compareTo(amountRangeFrom) >= 0 && depositAmount.compareTo(amountRangeTo) <= 0;
|
||||
returnValue = depositAmount.compareTo(amountRangeFrom) >= 0 && depositAmount.compareTo(amountRangeTo) <= 0;
|
||||
} else if (amountRangeFrom != null) {
|
||||
return depositAmount.compareTo(amountRangeFrom) >= 0;
|
||||
returnValue = depositAmount.compareTo(amountRangeFrom) >= 0;
|
||||
} else if (amountRangeTo != null) { return depositAmount.compareTo(amountRangeTo) <= 0; }
|
||||
return true;
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-3
@@ -217,9 +217,7 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi
|
||||
}
|
||||
|
||||
this.savingsAccountRepository.save(account);
|
||||
if (withdrawal != null) {
|
||||
saveTransactionToGenerateTransactionId(withdrawal);
|
||||
}
|
||||
|
||||
postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds);
|
||||
|
||||
return withdrawal;
|
||||
|
||||
+14
@@ -8,6 +8,7 @@ package org.mifosplatform.portfolio.savings.domain;
|
||||
import static org.mifosplatform.portfolio.savings.DepositsApiConstants.depositAmountParamName;
|
||||
import static org.mifosplatform.portfolio.savings.DepositsApiConstants.depositPeriodFrequencyIdParamName;
|
||||
import static org.mifosplatform.portfolio.savings.DepositsApiConstants.depositPeriodParamName;
|
||||
import static org.mifosplatform.portfolio.savings.DepositsApiConstants.expectedFirstDepositOnDateParamName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@@ -32,6 +33,7 @@ import org.mifosplatform.infrastructure.core.api.JsonCommand;
|
||||
import org.mifosplatform.infrastructure.core.data.DataValidatorBuilder;
|
||||
import org.mifosplatform.organisation.monetary.domain.Money;
|
||||
import org.mifosplatform.portfolio.savings.DepositAccountOnClosureType;
|
||||
import org.mifosplatform.portfolio.savings.SavingsApiConstants;
|
||||
import org.mifosplatform.portfolio.savings.SavingsPeriodFrequencyType;
|
||||
import org.mifosplatform.portfolio.savings.service.SavingsEnumerations;
|
||||
import org.springframework.data.jpa.domain.AbstractPersistable;
|
||||
@@ -122,6 +124,18 @@ public class DepositAccountTermAndPreClosure extends AbstractPersistable<Long> {
|
||||
actualChanges.put(depositPeriodFrequencyIdParamName, SavingsEnumerations.depositTermFrequencyType(newValue));
|
||||
this.depositPeriodFrequency = newValue;
|
||||
}
|
||||
|
||||
final String localeAsInput = command.locale();
|
||||
final String dateFormat = command.dateFormat();
|
||||
|
||||
if (command.isChangeInLocalDateParameterNamed(expectedFirstDepositOnDateParamName, getExpectedFirstDepositOnDate())) {
|
||||
final LocalDate newValue = command.localDateValueOfParameterNamed(expectedFirstDepositOnDateParamName);
|
||||
final String newValueAsString = command.stringValueOfParameterNamed(expectedFirstDepositOnDateParamName);
|
||||
actualChanges.put(expectedFirstDepositOnDateParamName, newValueAsString);
|
||||
actualChanges.put(SavingsApiConstants.localeParamName, localeAsInput);
|
||||
actualChanges.put(SavingsApiConstants.dateFormatParamName, dateFormat);
|
||||
this.expectedFirstDepositOnDate = newValue.toDate();
|
||||
}
|
||||
|
||||
if (this.preClosureDetail != null) {
|
||||
actualChanges.putAll(this.preClosureDetail.update(command, baseDataValidator));
|
||||
|
||||
+1
-1
@@ -584,7 +584,7 @@ public class SavingsAccount extends AbstractPersistable<Long> {
|
||||
LocalDate endOfBalanceDate = interestPostingUpToDate;
|
||||
for (int i = accountTransactionsSorted.size() - 1; i >= 0; i--) {
|
||||
final SavingsAccountTransaction transaction = accountTransactionsSorted.get(i);
|
||||
if (transaction.isNotReversed()) {
|
||||
if (transaction.isNotReversed() && !transaction.isInterestPostingAndNotReversed()) {
|
||||
transaction.updateCumulativeBalanceAndDates(this.currency, endOfBalanceDate);
|
||||
|
||||
// this transactions transaction date is end of balance date for
|
||||
|
||||
+3
-2
@@ -19,6 +19,7 @@ import org.mifosplatform.infrastructure.core.exception.PlatformDataIntegrityExce
|
||||
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
|
||||
import org.mifosplatform.portfolio.charge.domain.Charge;
|
||||
import org.mifosplatform.portfolio.interestratechart.service.InterestRateChartAssembler;
|
||||
import org.mifosplatform.portfolio.savings.DepositAccountType;
|
||||
import org.mifosplatform.portfolio.savings.data.DepositProductDataValidator;
|
||||
import org.mifosplatform.portfolio.savings.domain.DepositProductAssembler;
|
||||
import org.mifosplatform.portfolio.savings.domain.FixedDepositProduct;
|
||||
@@ -70,7 +71,7 @@ public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements
|
||||
this.fixedDepositProductRepository.save(product);
|
||||
|
||||
// save accounting mappings
|
||||
this.accountMappingWritePlatformService.createSavingProductToGLAccountMapping(product.getId(), command);
|
||||
this.accountMappingWritePlatformService.createSavingProductToGLAccountMapping(product.getId(), command, DepositAccountType.FIXED_DEPOSIT);
|
||||
|
||||
return new CommandProcessingResultBuilder() //
|
||||
.withEntityId(product.getId()) //
|
||||
@@ -107,7 +108,7 @@ public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements
|
||||
// accounting related changes
|
||||
final boolean accountingTypeChanged = changes.containsKey(accountingRuleParamName);
|
||||
final Map<String, Object> accountingMappingChanges = this.accountMappingWritePlatformService
|
||||
.updateSavingsProductToGLAccountMapping(product.getId(), command, accountingTypeChanged, product.getAccountingType());
|
||||
.updateSavingsProductToGLAccountMapping(product.getId(), command, accountingTypeChanged, product.getAccountingType(), DepositAccountType.FIXED_DEPOSIT);
|
||||
changes.putAll(accountingMappingChanges);
|
||||
|
||||
if (!changes.isEmpty()) {
|
||||
|
||||
+3
-2
@@ -19,6 +19,7 @@ import org.mifosplatform.infrastructure.core.exception.PlatformDataIntegrityExce
|
||||
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
|
||||
import org.mifosplatform.portfolio.charge.domain.Charge;
|
||||
import org.mifosplatform.portfolio.interestratechart.service.InterestRateChartAssembler;
|
||||
import org.mifosplatform.portfolio.savings.DepositAccountType;
|
||||
import org.mifosplatform.portfolio.savings.data.DepositProductDataValidator;
|
||||
import org.mifosplatform.portfolio.savings.domain.DepositProductAssembler;
|
||||
import org.mifosplatform.portfolio.savings.domain.RecurringDepositProduct;
|
||||
@@ -70,7 +71,7 @@ public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implem
|
||||
this.recurringDepositProductRepository.save(product);
|
||||
|
||||
// save accounting mappings
|
||||
this.accountMappingWritePlatformService.createSavingProductToGLAccountMapping(product.getId(), command);
|
||||
this.accountMappingWritePlatformService.createSavingProductToGLAccountMapping(product.getId(), command, DepositAccountType.RECURRING_DEPOSIT);
|
||||
|
||||
return new CommandProcessingResultBuilder() //
|
||||
.withEntityId(product.getId()) //
|
||||
@@ -107,7 +108,7 @@ public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implem
|
||||
// accounting related changes
|
||||
final boolean accountingTypeChanged = changes.containsKey(accountingRuleParamName);
|
||||
final Map<String, Object> accountingMappingChanges = this.accountMappingWritePlatformService
|
||||
.updateSavingsProductToGLAccountMapping(product.getId(), command, accountingTypeChanged, product.getAccountingType());
|
||||
.updateSavingsProductToGLAccountMapping(product.getId(), command, accountingTypeChanged, product.getAccountingType(), DepositAccountType.RECURRING_DEPOSIT);
|
||||
changes.putAll(accountingMappingChanges);
|
||||
|
||||
if (!changes.isEmpty()) {
|
||||
|
||||
+3
-2
@@ -18,6 +18,7 @@ import org.mifosplatform.infrastructure.core.data.CommandProcessingResultBuilder
|
||||
import org.mifosplatform.infrastructure.core.exception.PlatformDataIntegrityException;
|
||||
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
|
||||
import org.mifosplatform.portfolio.charge.domain.Charge;
|
||||
import org.mifosplatform.portfolio.savings.DepositAccountType;
|
||||
import org.mifosplatform.portfolio.savings.data.SavingsProductDataValidator;
|
||||
import org.mifosplatform.portfolio.savings.domain.SavingsProduct;
|
||||
import org.mifosplatform.portfolio.savings.domain.SavingsProductAssembler;
|
||||
@@ -93,7 +94,7 @@ public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements Savi
|
||||
this.savingProductRepository.save(product);
|
||||
|
||||
// save accounting mappings
|
||||
this.accountMappingWritePlatformService.createSavingProductToGLAccountMapping(product.getId(), command);
|
||||
this.accountMappingWritePlatformService.createSavingProductToGLAccountMapping(product.getId(), command, DepositAccountType.SAVINGS_DEPOSIT);
|
||||
|
||||
return new CommandProcessingResultBuilder() //
|
||||
.withEntityId(product.getId()) //
|
||||
@@ -129,7 +130,7 @@ public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements Savi
|
||||
// accounting related changes
|
||||
final boolean accountingTypeChanged = changes.containsKey(accountingRuleParamName);
|
||||
final Map<String, Object> accountingMappingChanges = this.accountMappingWritePlatformService
|
||||
.updateSavingsProductToGLAccountMapping(product.getId(), command, accountingTypeChanged, product.getAccountingType());
|
||||
.updateSavingsProductToGLAccountMapping(product.getId(), command, accountingTypeChanged, product.getAccountingType(), DepositAccountType.SAVINGS_DEPOSIT);
|
||||
changes.putAll(accountingMappingChanges);
|
||||
|
||||
if (!changes.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user