airajena commented on code in PR #5282:
URL: https://github.com/apache/fineract/pull/5282#discussion_r2686912203


##########
fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java:
##########
@@ -52,6 +52,11 @@ public List<LocalDateInterval> 
determineInterestPostingPeriods(final LocalDate s
             final Integer financialYearBeginningMonth, List<LocalDate> 
postInterestAsOn) {
 
         final List<LocalDateInterval> postingPeriods = new ArrayList<>();
+
+        if (startInterestCalculationLocalDate == null || 
interestPostingUpToDate == null) {

Review Comment:
   interestPostingUpToDate can be null when:
   depositPeriodFrequencyType is INVALID: In 
FixedDepositAccount.calculateMaturityDate(), the switch statement handles DAYS, 
WEEKS, MONTHS, and YEARS, but when  depositPeriodFrequencyType is INVALID, it 
falls through with an empty break, leaving maturityDate as null:
   
   Database has null/invalid deposit_period_frequency_enum: 
SavingsPeriodFrequencyType.fromInt() returns INVALID when the input is null or 
an unrecognized value. The column deposit_period_frequency_enum is marked as 
nullable = true in DepositAccountTermAndPreClosure
   
   Account reinvestment: DepositAccountTermAndPreClosure.copy() explicitly sets 
maturityDate = null when creating a copy for reinvestment. 
   
   startInterestCalculationLocalDate can be null when: 
   Account in early submission state: accountSubmittedOrActivationDate() could 
return null if both activationDate and submittedOnDate are null.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to