fix: travis
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py
index 49c0e36..aa0e67c 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.py
+++ b/erpnext/accounts/doctype/payment_request/payment_request.py
@@ -424,12 +424,11 @@
"docstatus": 1})
if payment_request_name:
- outstanding_amt = frappe.get_value(ref.reference_doctype, ref.reference_name, 'outstanding_amount')
doc = frappe.get_doc("Payment Request", payment_request_name)
- if doc.status != "Paid" and outstanding_amt <= 0:
+ if doc.status != "Paid" and ref.outstanding_amount <= ref.allocated_amount:
doc.db_set('status', 'Paid')
frappe.db.commit()
- elif doc.status != "Partially Paid" and outstanding_amt != doc.grand_total:
+ elif doc.status != "Partially Paid" and ref.outstanding_amount != ref.allocated_amount:
doc.db_set('status', 'Partially Paid')
frappe.db.commit()