How to close a loan

How does one close a Loan? I can see in the code (loan_security_unpledge.py) that the status becomes “Closed” after submitting and approving a Loan Security Unpledge document. But there isn’t a way to close it if there are no securities against the loan even if the Principal and Interest have been fully paid using Loan Repayment.

Related topics:

Thanks!