[ 
https://issues.apache.org/jira/browse/FINERACT-2281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bharath Gowda updated FINERACT-2281:
------------------------------------
    Description: 
When a loan has a repayment, full refund, goodwill credit, and then a repayment 
reversal, the accrual does not start at the repayment reversal date. Instead, 
the accruals start in the next installment period.

Loan product major pointers:
 *  check product related screenshots below
 
 
 

*Steps to reproduce*

 

{{1. Set busniess date to `2025-03-21`
2. Create Loan with the request body:
```
{
"clientId": {{{}clientId{}}},
"productId": 1,
"principal": 242.46,
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 29.99,
"amortizationType": 1,
"isEqualAmortization": false,
"interestType": 0,
"interestCalculationPeriodType": 0,
"allowPartialPeriodInterestCalcualtion": false,
"transactionProcessingStrategyCode": "advanced-payment-allocation-strategy",
"maxOutstandingLoanBalance": 10000,
"rates": [],
"locale": "en_US",
"dateFormat": "MM/dd/yyyy",
"loanType": "individual",
"enableDownPayment": false,
"expectedDisbursementDate": "03/21/2025",
"submittedOnDate": "03/21/2025"
}
```
3. Approve & disburse (without downpayment) $242.46 on 2025-03-21
4. Create Repayment of $100 on 2025-03-21
5. Create MIR of $242.46 on 2025-03-21
6. Update Business date to 2025-03-28 and run COB
7. Create CBR of $100 on 2025-03-28
8. Update Business date to 2025-04-02 and run COB
9. Reverse the repayment of step 4 on 2025-04-02
10. Update business date to 2025-04-21 and run COB. No `ACCRUAL`s were created.
11. Update business date to 2025-04-22 and run COB. No `ACCRUAL`s were created.
12. Update business date to 2025-04-23 and run COB. After this day, should 
observe `ACCRUAL`s created after COB every day. }}

*Expectation:*
 * Interest accruals start on day of repayment reversal (2025-04-02)

*What we are seeing:*
 * Interest accruals start in next repayment schedule (2025-04-22)

 * 
 **  

*Acceptance criteria*
 * In case of CBR (Credit Balance Refund) is replayed and the overpayment 
amount is not lower then the CBR amount, we need to reflect it as “credit” on 
the EmiModel and calculate interest based on the outstanding amount!

 * CBR in this case should behave like Chargeback, so the actual, current 
installment EMI got increased!
 * *In this example, as the time pass, each day the 1st installment interest 
got recalculated till we reach the maturity date*
**

  was:
When a loan has a repayment, full refund, goodwill credit, and then a repayment 
reversal, the accrual does not start at the repayment reversal date. Instead, 
the accruals start in the next installment period.

Loan product major pointers:
 *  
 
 
 

*Steps to reproduce*

 

{{1. Set busniess date to `2025-03-21`
2. Create Loan with the request body:
```
{
"clientId": {{{}clientId{}}},
"productId": 1,
"principal": 242.46,
"loanTermFrequency": 12,
"loanTermFrequencyType": 2,
"numberOfRepayments": 12,
"repaymentEvery": 1,
"repaymentFrequencyType": 2,
"interestRatePerPeriod": 29.99,
"amortizationType": 1,
"isEqualAmortization": false,
"interestType": 0,
"interestCalculationPeriodType": 0,
"allowPartialPeriodInterestCalcualtion": false,
"transactionProcessingStrategyCode": "advanced-payment-allocation-strategy",
"maxOutstandingLoanBalance": 10000,
"rates": [],
"locale": "en_US",
"dateFormat": "MM/dd/yyyy",
"loanType": "individual",
"enableDownPayment": false,
"expectedDisbursementDate": "03/21/2025",
"submittedOnDate": "03/21/2025"
}
```
3. Approve & disburse (without downpayment) $242.46 on 2025-03-21
4. Create Repayment of $100 on 2025-03-21
5. Create MIR of $242.46 on 2025-03-21
6. Update Business date to 2025-03-28 and run COB
7. Create CBR of $100 on 2025-03-28
8. Update Business date to 2025-04-02 and run COB
9. Reverse the repayment of step 4 on 2025-04-02
10. Update business date to 2025-04-21 and run COB. No `ACCRUAL`s were created.
11. Update business date to 2025-04-22 and run COB. No `ACCRUAL`s were created.
12. Update business date to 2025-04-23 and run COB. After this day, should 
observe `ACCRUAL`s created after COB every day. }}

*Expectation:*
 * Interest accruals start on day of repayment reversal (2025-04-02)

*What we are seeing:*
 * Interest accruals start in next repayment schedule (2025-04-22)

 * 
 **  

*Acceptance criteria*
 * In case of CBR (Credit Balance Refund) is replayed and the overpayment 
amount is not lower then the CBR amount, we need to reflect it as “credit” on 
the EmiModel and calculate interest based on the outstanding amount!

 * CBR in this case should behave like Chargeback, so the actual, current 
installment EMI got increased!
 * *In this example, as the time pass, each day the 1st installment interest 
got recalculated till we reach the maturity date*
**


> Interest Activities Not Posting For Loan With Repayment Reversal
> ----------------------------------------------------------------
>
>                 Key: FINERACT-2281
>                 URL: https://issues.apache.org/jira/browse/FINERACT-2281
>             Project: Apache Fineract
>          Issue Type: Bug
>            Reporter: Bharath Gowda
>            Priority: Major
>         Attachments: Screenshot 2025-05-06 at 2.06.30 PM.png, Screenshot 
> 2025-05-06 at 2.06.40 PM.png, Screenshot 2025-05-06 at 2.07.05 PM.png, 
> image-2025-05-15-19-13-16-281.png
>
>
> When a loan has a repayment, full refund, goodwill credit, and then a 
> repayment reversal, the accrual does not start at the repayment reversal 
> date. Instead, the accruals start in the next installment period.
> Loan product major pointers:
>  *  check product related screenshots below
>  
>  
>  
> *Steps to reproduce*
>  
> {{1. Set busniess date to `2025-03-21`
> 2. Create Loan with the request body:
> ```
> {
> "clientId": {{{}clientId{}}},
> "productId": 1,
> "principal": 242.46,
> "loanTermFrequency": 12,
> "loanTermFrequencyType": 2,
> "numberOfRepayments": 12,
> "repaymentEvery": 1,
> "repaymentFrequencyType": 2,
> "interestRatePerPeriod": 29.99,
> "amortizationType": 1,
> "isEqualAmortization": false,
> "interestType": 0,
> "interestCalculationPeriodType": 0,
> "allowPartialPeriodInterestCalcualtion": false,
> "transactionProcessingStrategyCode": "advanced-payment-allocation-strategy",
> "maxOutstandingLoanBalance": 10000,
> "rates": [],
> "locale": "en_US",
> "dateFormat": "MM/dd/yyyy",
> "loanType": "individual",
> "enableDownPayment": false,
> "expectedDisbursementDate": "03/21/2025",
> "submittedOnDate": "03/21/2025"
> }
> ```
> 3. Approve & disburse (without downpayment) $242.46 on 2025-03-21
> 4. Create Repayment of $100 on 2025-03-21
> 5. Create MIR of $242.46 on 2025-03-21
> 6. Update Business date to 2025-03-28 and run COB
> 7. Create CBR of $100 on 2025-03-28
> 8. Update Business date to 2025-04-02 and run COB
> 9. Reverse the repayment of step 4 on 2025-04-02
> 10. Update business date to 2025-04-21 and run COB. No `ACCRUAL`s were 
> created.
> 11. Update business date to 2025-04-22 and run COB. No `ACCRUAL`s were 
> created.
> 12. Update business date to 2025-04-23 and run COB. After this day, should 
> observe `ACCRUAL`s created after COB every day. }}
> *Expectation:*
>  * Interest accruals start on day of repayment reversal (2025-04-02)
> *What we are seeing:*
>  * Interest accruals start in next repayment schedule (2025-04-22)
>  * 
>  **  
> *Acceptance criteria*
>  * In case of CBR (Credit Balance Refund) is replayed and the overpayment 
> amount is not lower then the CBR amount, we need to reflect it as “credit” on 
> the EmiModel and calculate interest based on the outstanding amount!
>  * CBR in this case should behave like Chargeback, so the actual, current 
> installment EMI got increased!
>  * *In this example, as the time pass, each day the 1st installment interest 
> got recalculated till we reach the maturity date*
> **



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to