...
Remaining principal: Decreased when part of the principal is paid off. Does not depend on the fees.
Loan amount: stays the same throughout the loan term.
Installment balance: The amount due for the specific installment, including all the fees accrued during this installment.
Loan Phase
...
If Grace period
Loan phase: Define the phases of the loan (e.g., Grace period, Main period).
...