From 4df7679c65b8b1ebe07d9d02cee6c72b01319507 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 15 Feb 2019 13:08:04 +0530 Subject: [PATCH] fix: Get outstanding invoices --- erpnext/accounts/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 58e3e8793d..d4e1840eb9 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -615,7 +615,7 @@ def get_held_invoices(party_type, party): return held_invoices -def get_outstanding_invoices(party_type, party, account, condition=None, limit=1000): +def get_outstanding_invoices(party_type, party, account, condition=None, limit=None): outstanding_invoices = [] precision = frappe.get_precision("Sales Invoice", "outstanding_amount") or 2 @@ -628,7 +628,7 @@ def get_outstanding_invoices(party_type, party, account, condition=None, limit=1 invoice = 'Sales Invoice' if erpnext.get_party_account_type(party_type) == 'Receivable' else 'Purchase Invoice' held_invoices = get_held_invoices(party_type, party) - limit_cond = "limit %s" % (limit or 1000) + limit_cond = "limit %s" % limit if limit else "" invoice_list = frappe.db.sql(""" select