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


##########
fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java:
##########
@@ -157,6 +162,44 @@ private List<SavingsAccountTransactionData> 
fetchTransactionsFromIds(final List<
         return 
this.savingsAccountReadPlatformService.retrieveAllTransactionData(refNo);
     }
 
+    private Long validateAccountForCreditAllowOverdraft(Boolean 
allowOverdraft, Boolean isOverdraftDown,
+            SavingsAccountData savingsAccountData, 
SavingsAccountTransactionData savingsAccountTransactionData) {
+        Long accountId = null;
+        if (allowOverdraft) {
+            if 
(!MathUtil.isZero(savingsAccountData.getGlAccountIdForInterestReceivable())) {

Review Comment:
   The zero check on GL account ID has been reviewed and is now handled 
consistently in the updated method.



##########
fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsSchedularInterestPoster.java:
##########
@@ -157,6 +162,44 @@ private List<SavingsAccountTransactionData> 
fetchTransactionsFromIds(final List<
         return 
this.savingsAccountReadPlatformService.retrieveAllTransactionData(refNo);
     }
 
+    private Long validateAccountForCreditAllowOverdraft(Boolean 
allowOverdraft, Boolean isOverdraftDown,
+            SavingsAccountData savingsAccountData, 
SavingsAccountTransactionData savingsAccountTransactionData) {
+        Long accountId = null;
+        if (allowOverdraft) {
+            if 
(!MathUtil.isZero(savingsAccountData.getGlAccountIdForInterestReceivable())) {
+                accountId = isOverdraftDown
+                        ? 
MathUtil.isLessThanZero(savingsAccountTransactionData.getRunningBalance())
+                                ? 
savingsAccountData.getGlAccountIdForInterestReceivable()

Review Comment:
   This logic has been corrected — the updated method now distinguishes between 
positive and negative balances when selecting the GL account



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