JohnAlva commented on code in PR #4886:
URL: https://github.com/apache/fineract/pull/4886#discussion_r2249402705


##########
fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java:
##########
@@ -187,6 +191,12 @@ public static PostingPeriod createFromDTO(final 
LocalDateInterval periodInterval
 
                 closeOfDayBalance = endOfDayBalance.closingBalance();
                 openingDayBalance = closeOfDayBalance;
+            } else if (!isEntraceNewValidation && !isEndTransaction && 
MathUtil.isLessThanZero(transaction.getRunningBalance())

Review Comment:
   This handles first-day negative balances. If a transaction starts the period 
with a negative balance, it captures the end-of-day balance for that date and 
updates the openingDayBalance. For example, if Aug 1 starts below zero, this 
records it as a special case.



-- 
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