You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2021/06/01 16:14:48 UTC

[GitHub] [fineract] BLasan commented on a change in pull request #1745: Fix: Advanced Account Rule for Fees under Accrual Periodic type (Fineract-1031)

BLasan commented on a change in pull request #1745:
URL: https://github.com/apache/fineract/pull/1745#discussion_r643251265



##########
File path: fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
##########
@@ -215,17 +215,21 @@ private void createJournalEntriesForRepaymentsAndWriteOffs(final LoanDTO loanDTO
 
         // handle fees payment of writeOff (and reversals)
         if (feesAmount != null && !(feesAmount.compareTo(BigDecimal.ZERO) == 0)) {
+
             totalDebitAmount = totalDebitAmount.add(feesAmount);
 
             if (isIncomeFromFee) {
-                GLAccount account = this.helper.getLinkedGLAccountForLoanProduct(loanProductId,
-                        AccrualAccountsForLoan.INCOME_FROM_FEES.getValue(), paymentTypeId);
-                if (accountMap.containsKey(account)) {
-                    BigDecimal amount = accountMap.get(account).add(feesAmount);
-                    accountMap.put(account, amount);
-                } else {
-                    accountMap.put(account, feesAmount);
-                }
+                this.helper.createCreditJournalEntryOrReversalForLoanCharges(office, currencyCode,
+                        AccrualAccountsForLoan.INCOME_FROM_FEES.getValue(), loanProductId, loanId, transactionId, transactionDate,
+                        feesAmount, isReversal, loanTransactionDTO.getFeePayments());
+                // GLAccount account = this.helper.getLinkedGLAccountForLoanProduct(loanProductId,
+                // AccrualAccountsForLoan.INCOME_FROM_FEES.getValue(), paymentTypeId);
+                // if (accountMap.containsKey(account)) {
+                // BigDecimal amount = accountMap.get(account).add(feesAmount);
+                // accountMap.put(account, amount);
+                // } else {
+                // accountMap.put(account, feesAmount);
+                // }

Review comment:
       My bad. Will remove these




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

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