adamsaghy commented on code in PR #4886:
URL: https://github.com/apache/fineract/pull/4886#discussion_r2284510178
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java:
##########
@@ -81,6 +82,7 @@ public SavingsAccountData postInterest(final MathContext mc,
final LocalDate int
for (final PostingPeriod interestPostingPeriod : postingPeriods) {
final LocalDate interestPostingTransactionDate =
interestPostingPeriod.dateOfPostingTransaction();
final Money interestEarnedToBePostedForPeriod =
interestPostingPeriod.getInterestEarned();
+ final Boolean isOverdraft =
MathUtil.isLessThanZero(interestPostingPeriod.getInterestEarned());
Review Comment:
interestPostingPeriod.getInterestEarned() should never be minus... we should
not work with minus balances. It would be much better to have a new field which
contains whether the customer must pay interest on overdraft amount or not..
also flagging whether an account or interest period is in overdraft, should be
done by a flag, not by checking whether `interestEarned` is positive or
negative... @JohnAlva Thoughts?
--
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]