Revert "[#FINERACT-2422] standardize use of aging vs. ageing (#5289)"
This reverts commit 61034e6041.
This commit is contained in:
committed by
Adam Saghy
parent
f0692a8cf1
commit
ed32c133cc
+6
-6
@@ -872,7 +872,7 @@ public final class ProgressiveEMICalculator implements EMICalculator {
|
||||
|
||||
if (!paidBalancesFromTransactionDate.getOutstandingInterest().isZero()
|
||||
|| !paidBalancesFromTransactionDate.getOutstandingPrincipal().isZero()) {
|
||||
createRepaymentPeriodForEarlyRepaidAmountsDuringReAging(scheduleModel,
|
||||
createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(scheduleModel,
|
||||
paidBalancesFromTransactionDate.getOutstandingPrincipal(), paidBalancesFromTransactionDate.getOutstandingInterest(),
|
||||
false);
|
||||
}
|
||||
@@ -1827,7 +1827,7 @@ public final class ProgressiveEMICalculator implements EMICalculator {
|
||||
EqualAmortizationValues feesPenaltiesEqualAmortizationValues) {
|
||||
LocalDate originalMaturityDate = interestSchedule.getMaturityDate();
|
||||
List<RepaymentPeriod> reAgedRepaymentPeriods = new ArrayList<>(reageParameter.getNumberOfInstallments());
|
||||
OutstandingDetails reAgingAmounts = precalculateReAgeEqualAmortizationAmount(interestSchedule, transactionDate, reageParameter);
|
||||
OutstandingDetails reAgeingAmounts = precalculateReAgeEqualAmortizationAmount(interestSchedule, transactionDate, reageParameter);
|
||||
Money zero = interestSchedule.zero();
|
||||
|
||||
// calculate already paid balances from transaction date
|
||||
@@ -1856,15 +1856,15 @@ public final class ProgressiveEMICalculator implements EMICalculator {
|
||||
interestSchedule.getLastRepaymentPeriod().setNoUnrecognisedInterest(true);
|
||||
|
||||
if (!originalMaturityDate.isBefore(transactionDate)) {
|
||||
createRepaymentPeriodForEarlyRepaidAmountsDuringReAging(interestSchedule,
|
||||
createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(interestSchedule,
|
||||
paidBalancesFromTransactionDate.getOutstandingPrincipal(), paidBalancesFromTransactionDate.getOutstandingInterest(),
|
||||
true);
|
||||
}
|
||||
|
||||
updateModelForReageEqualAmortization(interestSchedule, reageParameter, reAgedRepaymentPeriods);
|
||||
|
||||
updateEMIForReAgeEqualAmortization(reAgedRepaymentPeriods, reAgingAmounts.getOutstandingPrincipal(),
|
||||
reAgingAmounts.getOutstandingInterest(), feesPenaltiesOutstanding, feesPenaltiesEqualAmortizationValues,
|
||||
updateEMIForReAgeEqualAmortization(reAgedRepaymentPeriods, reAgeingAmounts.getOutstandingPrincipal(),
|
||||
reAgeingAmounts.getOutstandingInterest(), feesPenaltiesOutstanding, feesPenaltiesEqualAmortizationValues,
|
||||
zero.getCurrency());
|
||||
|
||||
calculateOutstandingBalance(interestSchedule);
|
||||
@@ -1898,7 +1898,7 @@ public final class ProgressiveEMICalculator implements EMICalculator {
|
||||
}
|
||||
}
|
||||
|
||||
private void createRepaymentPeriodForEarlyRepaidAmountsDuringReAging(final ProgressiveLoanInterestScheduleModel interestSchedule,
|
||||
private void createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(final ProgressiveLoanInterestScheduleModel interestSchedule,
|
||||
final Money totalPaidPrincipal, final Money totalPaidInterest, final boolean isReAged) {
|
||||
final RepaymentPeriod targetPeriod = interestSchedule.getLastRepaymentPeriod();
|
||||
|
||||
|
||||
+3
-3
@@ -4277,7 +4277,7 @@ class ProgressiveEMICalculatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_chargeBackOn2ndRP_ReAgingOn1stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() {
|
||||
public void test_chargeBackOn2ndRP_ReAgeingOn1stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() {
|
||||
ProgressiveLoanInterestScheduleModel interestSchedule = generateSchedule();
|
||||
|
||||
emiCalculator.payPrincipal(interestSchedule, LocalDate.of(2024, 1, 1), LocalDate.of(2024, 2, 1), LocalDate.of(2024, 2, 1),
|
||||
@@ -4312,7 +4312,7 @@ class ProgressiveEMICalculatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_chargeBackOn2ndRP_ReAgingOn2stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() {
|
||||
public void test_chargeBackOn2ndRP_ReAgeingOn2stRPsDueDate_EQUAL_AMORTIZATION_FULL_INTEREST() {
|
||||
ProgressiveLoanInterestScheduleModel interestSchedule = generateSchedule();
|
||||
|
||||
emiCalculator.payPrincipal(interestSchedule, LocalDate.of(2024, 1, 1), LocalDate.of(2024, 2, 1), LocalDate.of(2024, 2, 1),
|
||||
@@ -4347,7 +4347,7 @@ class ProgressiveEMICalculatorTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_chargeBackOn2ndRP_ReAgingDuring2stRP_EQUAL_AMORTIZATION_FULL_INTEREST() {
|
||||
public void test_chargeBackOn2ndRP_ReAgeingDuring2stRP_EQUAL_AMORTIZATION_FULL_INTEREST() {
|
||||
ProgressiveLoanInterestScheduleModel interestSchedule = generateSchedule();
|
||||
|
||||
emiCalculator.payPrincipal(interestSchedule, LocalDate.of(2024, 1, 1), LocalDate.of(2024, 2, 1), LocalDate.of(2024, 2, 1),
|
||||
|
||||
Reference in New Issue
Block a user