fix: get existing payment req amount only from unpaid req (#20289)

This commit is contained in:
Saqib 2020-01-15 16:36:13 +05:30 committed by Nabin Hait
parent 61ad6292d6
commit 617a24191f

View File

@ -373,6 +373,7 @@ def get_existing_payment_request_amount(ref_dt, ref_dn):
reference_doctype = %s
and reference_name = %s
and docstatus = 1
and status != 'Paid'
""", (ref_dt, ref_dn))
return flt(existing_payment_request_amount[0][0]) if existing_payment_request_amount else 0