Logic of Interest Calculation
The following is the supposed logic in template of customer - exit.
First repayment
Interest = balance * interest rate * days between loan payment and first repayment / 365
From next time
Interest = balance * interest rate / 12
First repayment
Interest = balance * interest rate * days between loan payment and first repayment / 365
From next time
Interest = balance * interest rate * months from between last repayment / 12