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

Abhishek Chaudhary reassigned FINERACT-3032:
--------------------------------------------

    Assignee: Abhishek Chaudhary

> Link the two periods of the overdraft interest split explicitly
> ---------------------------------------------------------------
>
>                 Key: FINERACT-3032
>                 URL: https://issues.apache.org/jira/browse/FINERACT-3032
>             Project: Apache Fineract
>          Issue Type: Improvement
>          Components: Savings
>            Reporter: Abhishek Chaudhary
>            Assignee: Abhishek Chaudhary
>            Priority: Major
>             Fix For: 1.17.0
>
>
> FINERACT-3017 ([PR #6782|https://github.com/apache/fineract/pull/6782]) made 
> {{CompoundInterestHelper.calculateInterestForAllPostingPeriods}} calculate 
> the two periods that the overdraft split builds for one posting interval 
> together. The helper finds the pair by comparing the intervals of 
> neighbouring periods. That relies on 
> {{SavingsAccountInterestPostingServiceImpl.calculateInterestUsing}} adding 
> the two parts one right after the other, with the second part starting from 
> the closing balance of the first.
> The contract is implicit. The helper is shared by savings, fixed deposit and 
> recurring deposit accounts, and nothing tells someone who reorders the two 
> {{appendPostingPeriodIfAny}} calls, or adds the split to another path, that 
> the helper depends on it. Breaking it would silently bring back the 
> FINERACT-3017 bug.
> *Proposed change*
> The service links the two periods when it builds them, and 
> {{CompoundInterestHelper}} uses that link instead of comparing intervals.
> Raised in the review of PR #6782 and agreed as a follow-up.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to