
Hi Sander,
Interest recalculation is allowed only when "Calculate interest for exact days in partial period" is enabled in product definition.
Consider the scenario: holidays calendar is empty, all days are considered working days and payments are always on time, you will see the interest applied equally with interest rate 1% considering 12%pa interest with monthly payment period.
In case there is any date difference due to holidays/working days consideration or early payments etc, the calculation happens as follows:
Assume installment is falling on 1st Feb, but due to holiday the installment is postponed to 2nd Feb and consider 12%pa interest rate.
Interest for the whole month of Jan is calculated at 1% and interest for the 1 additional day in Feb is calculated as 1%*(1/28).
For the installment on 1st Mar, interest is calculated as 1%*(27/28) would be used.
This is how the current interest recalculation happens to make sure the interest is collected for each and every day.
And partial interest for any day is calculated based on the number of days in the loan installment period.
I am unable to reproduce other issues that you have mentioned. Looks like they are linked to some other factors as well. If you can reproduce them on demo.openmf.org and provide with loan ids or relevant details, we can get back with clarifications or verify if it is really a bug.
Regards,
Adi Raju
Principal Architect, Conflux Technologies Pvt Ltd
Address: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block, Bengaluru, Karnataka, 560043 INDIA
Disclaimer: The information contained in this e-mail message and any files/attachment transmitted with it is confidential and for the sole use of the intended recipient(s) or entity identified. If you are not the intended recipient, please email: support@confluxtechnologies.com and destroy/delete all copies and attachment thereto along with the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and is unlawful. The recipient acknowledges that Conflux Technologies Private Limited or its subsidiaries and associated companies are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions. Before opening any attachments, please check.

Hi Sander
PSB
Regards,
Adi Raju
Principal Architect, Conflux Technologies Pvt Ltd
Address: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block, Bengaluru, Karnataka, 560043 INDIA
Disclaimer: The information contained in this e-mail message and any files/attachment transmitted with it is confidential and for the sole use of the intended recipient(s) or entity identified. If you are not the intended recipient, please email: support@confluxtechnologies.com and destroy/delete all copies and attachment thereto along with the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and is unlawful. The recipient acknowledges that Conflux Technologies Private Limited or its subsidiaries and associated companies are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions. Before opening any attachments, please check.
-----Original Message-----
From: Sander van der Heyden [mailto:sandervanderheyden@musonisystem.com]
Sent: 07 December 2016 22:24
To: d...@fineract.incubator.apache.org
Cc: A good place to start for users or folks new to Mifos.
Subject: Re: Issues in interest recalculation
Hi Adi,
Thanks for your feedback. I already left some test cases on the demo (but have updated the same product in between so you'll need to check the derived data for these). I'll work on some more cases that we've seen locally tomorrow, but these are the ones that were already there.
*Incorrect interest in Loan Schedule for first instalment when making an early payment* See https://demo.openmf.org/#/viewloanaccount/302, where you see 3.85 of interest paid on the summary and loan transactions, yet the 3.85 is still due on the instalment and if you look at the schedule via the API is reported as outstanding interest (which the transaction has already paid).
[Adi] In case of interest recalculation enabled loans, there is no way to realise a complete EMI components whose due date is in the future. Any early payments gets adjusted to the principal, and hence there will be some interest component which will remain due as of the future due date. From calculations or schedule point of view the early paid amount is completely getting adjusted to Principal and interest is pending.
Repayment strategy decides the splitting of components in a transaction. Looks like the repayment strategy needs a correction not to consider the interest component in case of early payment.
*Interest recalculation causes incorrect schedule with duplicate instalments* For the daily loans with duplicate instalments see:
https://demo.openmf.org/#/viewloanaccount/304, where you can see that 2 payments fall due on the same day. If you undo disburse the loan and preview the schedule before disbursement you'll not see duplicate payments on the same day.
[Adi] As I see original schedule is fine, but during repayments some duplicates are seen. This is definitely a bug.
Thanks,
Sander
Sander van der Heyden
CTO Musoni Services
Mobile (NL): +31 (0)6 14239505
Skype: s.vdheyden
Website: musonisystem.com
Follow us on Twitter! <https://twitter.com/musonimfi> Postal address: Hillegomstraat 12-14, office 0.09, 1058 LS, Amsterdam, The Netherlands
On 7 December 2016 at 11:20, Adi Raju <adi.raju@confluxtechnologies.com>
> the intended recipient, please email: support@confluxtechnologies.com
Interest calculation on future dates will be based on the assumption that payment has been made up-to-date and assuming no arrears.
Interest on the unpaid or compounded amount will be calculated and provided as part of schedule only till as of that day.
So in the example,
EMI is due on 1st Dec and 2nd Jan. No repayment is made as of today (12/12).
So interest calculation will be as follows:
Interest on compounded amount as of 1 Dec for 11 days (1st to 12th of dec)
Plus
Interest on amount as per original schedule for 21 days (13th dec to 2nd of jan)
As and when interest recalculation job runs every day, interest will be revised to include calculations as of that day.
Regards,
Adi Raju
Principal Architect, Conflux Technologies Pvt Ltd
Address: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block, Bengaluru, Karnataka, 560043 INDIA
Disclaimer: The information contained in this e-mail message and any files/attachment transmitted with it is confidential and for the sole use of the intended recipient(s) or entity identified. If you are not the intended recipient, please email: support@confluxtechnologies.com and destroy/delete all copies and attachment thereto along with the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and is unlawful. The recipient acknowledges that Conflux Technologies Private Limited or its subsidiaries and associated companies are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions. Before opening any attachments, please check.
-----Original Message-----
From: Sander van der Heyden [mailto:sandervanderheyden@musonisystem.com]
Sent: 09 December 2016 22:08
To: d...@fineract.incubator.apache.org
Cc: A good place to start for users or folks new to Mifos.
Subject: Re: Issues in interest recalculation
Hi Adi,
Thanks for your feedback, makes sense on the early payments and I agree the duplicate instalments is a bug. Looks like the holiday/workingdays config is ignored for that bit. However I think we'll indeed need to introduce this in the payment schedules as well. In addition I found another strange scenario which is: https://demo.openmf.org/#/viewloanaccount/321
Can you explain to me how the calculation for the interest for the 2nd instalment is made, so the first instalment which was due 8 days ago is now overdue by 8 days and interest (should have) compounded as well. However I cannot work out the formula used to get to that amount of interest, when running the same example for a loan just 1 day overdue, I was able to work out the amount, but only as long as I calculated 2 extra days. Is there any docs on this on the wiki (I could not spot them).
Thanks,
Sander
Sander van der Heyden
CTO Musoni Services
Mobile (NL): +31 (0)6 14239505
Skype: s.vdheyden
Website: musonisystem.com
Follow us on Twitter! <https://twitter.com/musonimfi> Postal address: Hillegomstraat 12-14, office 0.09, 1058 LS, Amsterdam, The Netherlands
On 8 December 2016 at 06:23, Adi Raju <adi.raju@confluxtechnologies.com>
wrote:
> Hi Sander
>
> PSB
>
> Regards,
> Adi Raju
>
> Principal Architect, Conflux Technologies Pvt Ltd
> Address: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block,
> Bengaluru, Karnataka, 560043 INDIA
>
>
> Disclaimer: The information contained in this e-mail message and any
> files/attachment transmitted with it is confidential and for the sole
> use of the intended recipient(s) or entity identified. If you are not
> the intended recipient, please email: support@confluxtechnologies.com
> > support@confluxtechnologies.com and destroy/delete all copies and

Hi Adi,Thanks for your feedback, but not sure whether we can make this calculation work, see attached excel using the same logic. It works fine for working out instalment one, but does leave us with a 0.4 difference on the second instalment compared to today's schedule. Could you let me know where we are going wrong, or whether this is actually a bug?
Thanks,Sander
On 12 December 2016 at 06:20, Adi Raju <adi.raju@confluxtechnologies.com> wrote:
Interest calculation on future dates will be based on the assumption that payment has been made up-to-date and assuming no arrears.
Interest on the unpaid or compounded amount will be calculated and provided as part of schedule only till as of that day.
So in the example,
EMI is due on 1st Dec and 2nd Jan. No repayment is made as of today (12/12).
So interest calculation will be as follows:
Interest on compounded amount as of 1 Dec for 11 days (1st to 12th of dec)
Plus
Interest on amount as per original schedule for 21 days (13th dec to 2nd of jan)
As and when interest recalculation job runs every day, interest will be revised to include calculations as of that day.
Regards,
Adi Raju
Principal Architect, Conflux Technologies Pvt Ltd
Address: #304, 2nd Floor, 7th Main Road, HRBR Layout 1st Block, Bengaluru, Karnataka, 560043 INDIA
Disclaimer: The information contained in this e-mail message and any files/attachment transmitted with it is confidential and for the sole use of the intended recipient(s) or entity identified. If you are not the intended recipient, please email: sup...@confluxtechnologies.com and destroy/delete all copies and attachment thereto along with the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and is unlawful. The recipient acknowledges that Conflux Technologies Private Limited or its subsidiaries and associated companies are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions. Before opening any attachments, please check.
> the intended recipient, please email: sup...@confluxtechnologies.com
> > sup...@confluxtechnologies.com and destroy/delete all copies and
Hi Adi,Was wondering if you had seen my previous mail?In addition we've also got an issue when backdating the interest recalculation loans that have compounding on Interest enabled, and use the "Same as repayment period" compounding type for interest and principal. This sample loan (https://demo.openmf.org/#/loanaccount/333/disburse) cannot be disbursed as a result of an EMI error: error.msg.loanschedule.emi.amount.must.be.greter.than.interest, when you disburse with date of 1st of October.If you try to disburse as per 1st of November then it does work fine, which leads me to believe there is an issue in the error handling around compounding for backdated loans. As there are no params on a loan level, that we can adjust to not trigger interest recalculation when disbursing I'm not sure how to get around this one?Thanks,Sander
Sander van der Heyden
CTO Musoni ServicesMobile (NL): +31 (0)6 14239505
Skype: s.vdheyden
Website: musonisystem.com
Follow us on Twitter!
Postal address: Hillegomstraat 12-14, office 0.09, 1058 LS, Amsterdam, The Netherlands