Please find the 2 screenshots in the attachment. In the first one I've paid all payments in time except the last which I paid 29 days later on 04 June (Loan end date is 05 May). Mifos calculated interest for that period and posted one extra repayment cycle on 04 June.
In the second one, I paid the same amount but this time on 06 June but mifos did not calculate extra interest for those 31 days. Instead it closed the loan as if all the repayments were done in time.