Skip to content

Commit 6e6666f

Browse files
committed
Rename None
1 parent 89764d7 commit 6e6666f

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
lines changed

fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public enum SavingsCompoundingInterestPeriodType {
3434
MONTHLY(4, "savingsCompoundingInterestPeriodType.monthly"), //
3535
QUATERLY(5, "savingsCompoundingInterestPeriodType.quarterly"), //
3636
BI_ANNUAL(6, "savingsCompoundingInterestPeriodType.biannual"), //
37-
ANNUAL(7, "savingsCompoundingInterestPeriodType.annual"),//
38-
NO_COMPOUNDING_SIMPLE_INTEREST(8, "savingsCompoundingInterestPeriodType.nocompounding");
37+
ANNUAL(7, "savingsCompoundingInterestPeriodType.annual"), //
38+
NONE(8, "savingsCompoundingInterestPeriodType.none");//
3939

4040
private final Integer value;
4141
private final String code;
@@ -79,7 +79,7 @@ public static SavingsCompoundingInterestPeriodType fromInt(final Integer v) {
7979
case 7:
8080
return ANNUAL;
8181
case 8:
82-
return NO_COMPOUNDING_SIMPLE_INTEREST;
82+
return NONE;
8383
default:
8484
return INVALID;
8585
}

fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/MonthlyCompoundingPeriod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte
140140
// break;
141141
// case ANNUAL:
142142
// break;
143-
case NO_COMPOUNDING_SIMPLE_INTEREST:
143+
case NONE:
144144
interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear,
145145
minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation);
146-
break;
146+
break;
147147
case INVALID:
148148
break;
149149
default:

fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public BigDecimal calculateInterest(final CompoundInterestValues compoundInteres
292292
// to be applied to the balanced for interest calculation
293293
for (final CompoundingPeriod compoundingPeriod : this.compoundingPeriods) {
294294

295-
if (SavingsCompoundingInterestPeriodType.NO_COMPOUNDING_SIMPLE_INTEREST.equals(this.interestCompoundingType)){
295+
if (SavingsCompoundingInterestPeriodType.NONE.equals(this.interestCompoundingType)) {
296296
compoundInterestValues.setCompoundedInterest(BigDecimal.ZERO);
297297
}
298298

@@ -448,7 +448,7 @@ private static List<CompoundingPeriod> compoundingPeriodsInPostingPeriod(final L
448448
periodStartDate = periodEndDate.plusDays(1);
449449
}
450450
break;
451-
case NO_COMPOUNDING_SIMPLE_INTEREST:
451+
case NONE:
452452
final LocalDate postingPeriodEndDateNONE = postingPeriodInterval.endDate();
453453

454454
periodStartDate = postingPeriodInterval.startDate();
@@ -472,7 +472,7 @@ private static List<CompoundingPeriod> compoundingPeriodsInPostingPeriod(final L
472472
// move periodStartDate forward to day after this period
473473
periodStartDate = periodEndDate.plusDays(1);
474474
}
475-
break;
475+
break;
476476
}
477477

478478
return compoundingPeriods;
@@ -523,9 +523,9 @@ private static LocalDate determineInterestPeriodEndDateFrom(final LocalDate peri
523523
}
524524
break;
525525

526-
case NO_COMPOUNDING_SIMPLE_INTEREST:
526+
case NONE:
527527
periodEndDate = periodEndDate.with(TemporalAdjusters.lastDayOfMonth());
528-
break;
528+
break;
529529
}
530530

531531
return periodEndDate;

fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,10 @@ public static EnumOptionData compoundingInterestPeriodType(final SavingsCompound
440440
optionData = new EnumOptionData(SavingsCompoundingInterestPeriodType.ANNUAL.getValue().longValue(),
441441
codePrefix + SavingsCompoundingInterestPeriodType.ANNUAL.getCode(), "Annually");
442442
break;
443-
case NO_COMPOUNDING_SIMPLE_INTEREST:
444-
optionData = new
445-
EnumOptionData(SavingsCompoundingInterestPeriodType.NO_COMPOUNDING_SIMPLE_INTEREST.getValue().longValue(),
446-
codePrefix +
447-
SavingsCompoundingInterestPeriodType.NO_COMPOUNDING_SIMPLE_INTEREST.getCode(),
448-
"No Compounding - Simple Interest");
449-
break;
443+
case NONE:
444+
optionData = new EnumOptionData(SavingsCompoundingInterestPeriodType.NONE.getValue().longValue(),
445+
codePrefix + SavingsCompoundingInterestPeriodType.NONE.getCode(), "None");
446+
break;
450447
}
451448

452449
return optionData;

fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public Collection<EnumOptionData> retrieveCompoundingInterestPeriodTypeOptions()
5959
SavingsEnumerations.compoundingInterestPeriodType(SavingsCompoundingInterestPeriodType.MONTHLY),
6060
SavingsEnumerations.compoundingInterestPeriodType(SavingsCompoundingInterestPeriodType.QUATERLY),
6161
SavingsEnumerations.compoundingInterestPeriodType(SavingsCompoundingInterestPeriodType.BI_ANNUAL),
62-
SavingsEnumerations.compoundingInterestPeriodType(SavingsCompoundingInterestPeriodType.NO_COMPOUNDING_SIMPLE_INTEREST),
62+
SavingsEnumerations.compoundingInterestPeriodType(SavingsCompoundingInterestPeriodType.NONE),
6363
SavingsEnumerations.compoundingInterestPeriodType(SavingsCompoundingInterestPeriodType.ANNUAL));
6464

6565
return allowedOptions;

fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositProduct.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,9 @@ public DepositProductTermAndPreClosure depositProductTermAndPreClosure() {
285285

286286
public void validateInterestPostingAndCompoundingPeriodTypes(final DataValidatorBuilder baseDataValidator) {
287287
Map<SavingsPostingInterestPeriodType, List<SavingsCompoundingInterestPeriodType>> postingtoCompoundMap = new HashMap<>();
288-
postingtoCompoundMap.put(SavingsPostingInterestPeriodType.MONTHLY, Arrays.asList(new SavingsCompoundingInterestPeriodType[] {
289-
SavingsCompoundingInterestPeriodType.DAILY, SavingsCompoundingInterestPeriodType.MONTHLY, SavingsCompoundingInterestPeriodType.NO_COMPOUNDING_SIMPLE_INTEREST }));
288+
postingtoCompoundMap.put(SavingsPostingInterestPeriodType.MONTHLY,
289+
Arrays.asList(new SavingsCompoundingInterestPeriodType[] { SavingsCompoundingInterestPeriodType.DAILY,
290+
SavingsCompoundingInterestPeriodType.MONTHLY, SavingsCompoundingInterestPeriodType.NONE }));
290291

291292
postingtoCompoundMap.put(SavingsPostingInterestPeriodType.QUATERLY,
292293
Arrays.asList(new SavingsCompoundingInterestPeriodType[] { SavingsCompoundingInterestPeriodType.DAILY,

0 commit comments

Comments
 (0)