San-43 commented on code in PR #5816:
URL: https://github.com/apache/fineract/pull/5816#discussion_r3162382227


##########
fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java:
##########
@@ -159,6 +164,27 @@ else if (transactionType.isInterestPaymentWaiver() || 
transactionType.isInterest
         }
     }
 
+    private void createJournalEntriesForTransfers(final LoanDTO loanDTO, final 
LoanTransactionDTO loanTransactionDTO, final Office office) {
+        final Long loanProductId = loanDTO.getLoanProductId();
+        final Long loanId = loanDTO.getLoanId();
+        final String currencyCode = loanDTO.getCurrencyCode();
+
+        final String transactionId = loanTransactionDTO.getTransactionId();
+        final LocalDate transactionDate = 
loanTransactionDTO.getTransactionDate();
+        final BigDecimal principalAmount = loanTransactionDTO.getPrincipal();

Review Comment:
   i will add a guard around the principal amount using `isGreaterThanZero`. If 
the transfer transaction has no principal amount, no journal entries will be 
created. I also will add the corresponding focused unit test for this 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