[ https://issues.apache.org/jira/browse/FINERACT-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15751132#comment-15751132 ]
ASF GitHub Bot commented on FINERACT-7: --------------------------------------- Github user abdulazizali77 commented on a diff in the pull request: https://github.com/apache/incubator-fineract/pull/256#discussion_r92592164 --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java --- @@ -494,17 +494,29 @@ private void updateInstallmentCharges() { this.loanInstallmentCharge.addAll(chargePerInstallments); } else { int index = 0; - final LoanInstallmentCharge[] loanChargePerInstallments = new LoanInstallmentCharge[chargePerInstallments.size()]; - final LoanInstallmentCharge[] loanChargePerInstallmentArray = chargePerInstallments.toArray(loanChargePerInstallments); - for (final LoanInstallmentCharge chargePerInstallment : this.loanInstallmentCharge) { + //FINERACT-7: NB: this is really overkill and slow, without changing the Sets and or Entities this is the most + //locally safe way to fix this issue + ArrayList<LoanInstallmentCharge> oldChargeInstallments = new ArrayList<LoanInstallmentCharge>(); + ArrayList<LoanInstallmentCharge> newChargeInstallments = new ArrayList<LoanInstallmentCharge>(); + + oldChargeInstallments.addAll(this.loanInstallmentCharge); + newChargeInstallments.addAll(chargePerInstallments); + Collections.sort(oldChargeInstallments); + Collections.sort(newChargeInstallments); --- End diff -- fixed. (was a mistake in patch cleaning) > Repayment Schedule after waive fee not correct > ---------------------------------------------- > > Key: FINERACT-7 > URL: https://issues.apache.org/jira/browse/FINERACT-7 > Project: Apache Fineract > Issue Type: Bug > Components: Loan > Reporter: Dayna Harp > Assignee: Markus Geiss > Attachments: 1.jpg, 2.jpg, 3.jpg > > > https://mifosforge.jira.com/browse/MIFOSX-2495 > After waive installment fee the repayment schedule generated is not proper > 1. Create Installment fee for a loan as 100-Flat-Regular. > 2. Create loan product with following datasets and attache above installment > fee to that. > Terms vary based on loan cycle : FALSE > Principal: 10,000 ( Min: , Max : ) > Number of Repayments: 12 ( Min: , Max > Repay Every: 1 Months > Nominal Interest Rate: 1 ( Min: , Max Per month > Minimum days between disbursal and first repayment date > Amortization Equal installments > Interest Method Declining Balance > Interest Calculation Period Daily > Repayment Strategy Overdue/Due Fee/Int,Principal > Account moves out of NPA only after all arrears have been cleared? No > Days in year Actual > Days in month Actual > Principal Threshold (%) for Last Instalment 0 > Allow fixing of the installment amount No > Interest Recalculation > Recalculate Interest Yes > Advance payments adjustment type Reduce number of installments > Pre-closure interest calculation rule Calculate till pre closure date > Interest recalculation compounding on None > Frequency for recalculate Outstanding Principal Daily > Frequency Interval for recalculation 1 > Frequency Date for recalculation 01-Jan-15 > Is Arrears recognization based on original schedule:No. > 3. Submit new loan application on 01 October 2015. Approve and disburse loan > on same date. > 4. Click on waive charge and select for 1st repayment. > 5. Repayment schedule generated after waive charge is not proper > >Waive charge is happening not for first installment instead for other > >installment it is happening. > 6. For first repayment the due is getting displayed. > Attachments here: https://mifosforge.jira.com/browse/MIFOSX-2495 -- This message was sent by Atlassian JIRA (v6.3.4#6332)