adamsaghy commented on code in PR #4837:
URL: https://github.com/apache/fineract/pull/4837#discussion_r2213084505


##########
fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java:
##########
@@ -177,16 +203,25 @@ public static PostingPeriod createFromDTO(final 
LocalDateInterval periodInterval
                 // period so no need to do any cropping/bounding
                 final EndOfDayBalance endOfDayBalance = 
transaction.toEndOfDayBalance(openingDayBalance);
                 accountEndOfDayBalances.add(endOfDayBalance);
+                endOfDayBalance.setDecimals(currency.getDigitsAfterDecimal());
 
                 openingDayBalance = endOfDayBalance.closingBalance();
 
             } else if (transaction.spansAnyPortionOf(periodInterval)) {
                 final EndOfDayBalance endOfDayBalance = 
transaction.toEndOfDayBalanceBoundedBy(openingDayBalance, periodInterval,
                         isAllowOverdraft);
                 accountEndOfDayBalances.add(endOfDayBalance);
+                endOfDayBalance.setDecimals(currency.getDigitsAfterDecimal());
 
                 closeOfDayBalance = endOfDayBalance.closingBalance();
                 openingDayBalance = closeOfDayBalance;
+            } else if (!isEntraceNewValidation && !isEndTransaction && 
MathUtil.isLessThanZero(transaction.getRunningBalance())
+                    && DateUtils.isEqual(periodInterval.startDate(), 
transaction.getDate())) {
+                final EndOfDayBalance endOfDayBalance = 
transaction.toEndOfDayBalanceDates(openingDayBalance, periodInterval);

Review Comment:
   Can you please help me understand this logic?



-- 
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: commits-unsubscr...@fineract.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to