Add ability to configure payment order: add possibility to always repay overdue interest first
Currently, the order of loan payments is always the same:
1. 1st installment's: Misc Penalty, Penalty, Misc Fees, Fees, Interest, Principal
2. 2nd installment's: Misc Penalty, Penalty, Misc Fees, Fees, Interest, Principal
3. 3rd installment's...
There is a need to add configuration setting which will allow to change the default order of payments to the following one:
1. All overdue/current Interest
2. 1st installment's: Misc Penalty, Penalty, Misc Fees, Fees, Principal
3. 2nd installment's: Misc Penalty, Penalty, Misc Fees, Fees, Principal
4. 3rd installment's...
This means we need to add a single option to choose from the following repayment strategies:
the old payment order
always repay overdue interest first
Verified on 23.08.2012
Bug has been fixed properly.
Build Date: Wed Aug 22 02:57:29 PDT 2012
Build Number: hudson-head-master-archive-1048
fixed in commit a107ec75fcb324298f37b6d41788658b3be5685b
there are two problems with 'repay overdue interest first' option.
First: if payment date is a due date of installment then current interest is not repaid as first. Applied payment is used to repay overdue fees, penalties and principals.
Second: There is a problem in Declining Balance - Interest Recalculation interest rate. Overdue interests (except first one) are not repaid to the end. See attached file.
fixed in commit: dd596765374cb817bfca57beff422301cca57dc6
Build number: head-master-commit-1200
Łukasz, can you check if the mentioned solution from hudsonBuild-MIFOS-5636 is working as expected? Moreover, it should be also added to the Declining Balance - Interest Recalculation type of loans. If everything is correct, please also add tests and merge everything into master.