[
https://issues.apache.org/jira/browse/FINERACT-1557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17543643#comment-17543643
]
John Woodlock commented on FINERACT-1557:
-----------------------------------------
The issue quite likely to be related to the fact that, for the loan approval
transaction, the "recalculateLoanCharge" can happen twice (probably 2 schedule
regenerations) whereas it only happens once on Submit and Disburse (and no
problems with them). Would take more analysis/troubleshooting to figure out
how not to 'regenerate the schedule' twice or make the merging (below)
foolproof.
Implementation of fix:
For loan installment charges only where the current status is submitted or
approved
Clear down installment charges from the loanCharge and from each of the
repayment installments and allow them to be recalculated fully anew. This patch
avoids the 'merging' of existing and regenerated installment charges which was
resulting in the installment charges being deleted on loan approval.
Problem code in updateInstallmentCharges in LoanCharge.java: the merging looks
like it will work but doesn't so this patch simply hits the part which 'adds
all' (from empty) rather than merge.
* if (this.loanInstallmentCharge.isEmpty()) {
this.loanInstallmentCharge.addAll(newChargeInstallments); ...
> Failing Test in Fineract - Null Pointer Exception
> -------------------------------------------------
>
> Key: FINERACT-1557
> URL: https://issues.apache.org/jira/browse/FINERACT-1557
> Project: Apache Fineract
> Issue Type: Bug
> Reporter: Manoj Mohanan
> Assignee: John Woodlock
> Priority: Major
> Fix For: 1.7.0
>
> Attachments: stacktraces.txt
>
>
> java.lang.AssertionError: 1 expectation failed.
> [863|https://github.com/apache/fineract/runs/5740124737?check_suite_focus=true#step:10:863]
> Expected status code <200> but was <500>.
> [864|https://github.com/apache/fineract/runs/5740124737?check_suite_focus=true#step:10:864]
> at
> org.apache.fineract.integrationtests.ClientLoanIntegrationTest.testLoanRefundByCashCashBasedAccounting
>
>
>
> !https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif!
> !https://ssl.gstatic.com/docs/doclist/images/mediatype/icon_1_text_x32.png|id=:2ot!
> stacktraces.txt
> 654 KB
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)