diff --git a/erpnext/hr/doctype/loan/loan.py b/erpnext/hr/doctype/loan/loan.py index 6cf0c2fc7f8..d83fbb7fed0 100644 --- a/erpnext/hr/doctype/loan/loan.py +++ b/erpnext/hr/doctype/loan/loan.py @@ -124,6 +124,7 @@ def update_disbursement_status(doc): """, (doc.payment_account, doc.name), as_dict=1)[0] disbursement_date = None + status = '' if not disbursement or disbursement.disbursed_amount == 0: status = "Sanctioned" elif disbursement.disbursed_amount == doc.loan_amount: