From 9f9426689239338095b78a8d2b9ad9a5a4447b8a Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 14 Mar 2016 11:23:03 +0530 Subject: [PATCH] [fixes] fetch value from grand total field while creating payment request from si --- erpnext/accounts/doctype/payment_request/payment_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index bd4cc4d622..0c4619198e 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -211,7 +211,7 @@ def get_amount(ref_doc, dt): grand_total = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid) if dt == "Sales Invoice": - grand_total = flt(ref_doc.outstanding_amount) + grand_total = flt(ref_doc.grand_total) if grand_total > 0 : return grand_total