[
https://issues.apache.org/jira/browse/FINERACT-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18105246#comment-18105246
]
Sonigra Bhavya Hemendrabhai commented on FINERACT-2123:
-------------------------------------------------------
Hi @Adam Saghy and @Bharath Gowda,
Here is a breakdown of the changes for this issue:
*The Bug:* The accounting logic for active loan cash refunds was mistakenly
using cash-based rules even when configured for accrual accounting. Because of
this, refunds were incorrectly routing to {{INCOME}} accounts.
*The Fix:* I updated the {{createJournalEntriesForRefundForActiveLoan}} method
in {{{}AccrualBasedAccountingProcessorForLoan.java{}}}. The accounting routes
are now correctly mapped to their respective {{RECEIVABLE}} asset accounts
(specifically {{{}FEES_RECEIVABLE{}}}, {{{}PENALTIES_RECEIVABLE{}}}, and
{{{}INTEREST_RECEIVABLE{}}}).
*Testing Updates:* To get the build completely green, I also had to update the
legacy assertions in {{ClientLoanIntegrationTest.java}} and the related
Cucumber E2E {{.feature}} files. They are now correctly expecting the new Asset
journal entries rather than the old Income ones.
Let me know if you need me to adjust anything or if you have any feedback
during the review!
> Incorrect Accural Accounting for Refund For Active Loan
> -------------------------------------------------------
>
> Key: FINERACT-2123
> URL: https://issues.apache.org/jira/browse/FINERACT-2123
> Project: Apache Fineract
> Issue Type: Bug
> Components: Accounting
> Affects Versions: 1.10.0, 1.11.0, 1.12.1
> Reporter: Steve Broughton
> Priority: Major
> Labels: beginner, beginner-friendly
> Attachments:
> Fix_incorrect_GL_entries_which_were_being_generated_on_refund_of_active_loan.patch,
> image-2024-09-23-15-51-39-624.png
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The refund for active loan transaction is incorrectly accounted for on a cash
> basis when the product is configured for accrual accounting.
>
> Fault is in:
> AccrualBasedAccountingProcessorForLoan.createJournalEntriesForRefundForActiveLoan
> method
>
> When the credit entries are created they use income accounts instead of
> receivable accounts. This would be correct only for cash basis accounting
> only. Accrual accounting requires that these amounts come from the receivable
> accounts.
>
> *Steps to reproduce*
> 1. Overpay a loan
> 2. Perform a refund
> 3. Examine the GL entries
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)