JohnAlva commented on code in PR #4886:
URL: https://github.com/apache/fineract/pull/4886#discussion_r2263386706
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java:
##########
@@ -444,6 +546,26 @@ protected void recalculateDailyBalances(final Money
openingAccountBalance, final
accountTransaction.updateRunningBalance(runningBalance);
addTransactionToExisting(accountTransaction,
savingsAccountData);
+ isTransactionsModified = true;
+ } else if
(overdraftAmount.isNotEqualTo(Money.of(savingsAccountData.getCurrency(),
transaction.getOverdraftAmount()))
+ &&
MathUtil.isLessThanZero(transaction.getRunningBalance())) {
+ SavingsAccountTransactionData accountTransaction =
transaction;
+ if (transaction.isChargeTransaction()) {
+ Set<SavingsAccountChargesPaidByData> chargesPaidBy =
transaction.getSavingsAccountChargesPaid();
+ final Set<SavingsAccountChargesPaidByData>
newChargePaidBy = new HashSet<>();
+ chargesPaidBy.forEach(
+ x ->
newChargePaidBy.add(SavingsAccountChargesPaidByData.instance(x.getChargeId(),
x.getAmount())));
Review Comment:
the variable name x was too generic. I've renamed it to chargePaidBy to
improve clarity.
--
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]