fix: Pending amount after loan closure request

This commit is contained in:
Deepesh Garg 2020-08-31 19:17:29 +05:30
parent bdc933b3d3
commit 25042a22eb

View File

@ -297,7 +297,7 @@ def get_amounts(amounts, against_loan, posting_date, payment_type):
if not final_due_date:
final_due_date = add_days(due_date, loan_type_details.grace_period_in_days)
if against_loan_doc.status == 'Disbursed':
if against_loan_doc.status in ('Disbursed', 'Loan Closure Requested'):
pending_principal_amount = against_loan_doc.total_payment - against_loan_doc.total_principal_paid - against_loan_doc.total_interest_payable
else:
pending_principal_amount = against_loan_doc.disbursed_amount