Repayment Order
When a payment is made in the system, it is allocated among principal, interest, penalty, and fees. The repayment order determines which of these is paid first. By default, the repayment order is penalty, fees, interest, and then principal.
The repayment order can be changed to suit your preference when you create a loan product. To create loan product, see Creating New Loan Products
To set repayment order on loan product creation, see Decimal Places, Rounding Off and Repayment Order

Please Note
If you edit an existing loan product to change the repayment order, the loans that were already created before the change will not be affected.