From 845bbe3e27eac7dff621e56dfec7c0e8175afcc2 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 4 Aug 2015 10:48:05 +0530 Subject: [PATCH] Update fix_invoice_outstanding.py --- erpnext/patches/v5_4/fix_invoice_outstanding.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v5_4/fix_invoice_outstanding.py b/erpnext/patches/v5_4/fix_invoice_outstanding.py index 81b8f2c2df..54a1da69ef 100644 --- a/erpnext/patches/v5_4/fix_invoice_outstanding.py +++ b/erpnext/patches/v5_4/fix_invoice_outstanding.py @@ -6,7 +6,8 @@ import frappe from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt def execute(): + frappe.reload_doctype("Sales Invoice") return_entries = frappe.get_list("Sales Invoice", filters={"is_return": 1, "docstatus": 1}, fields=["debit_to", "customer", "return_against"]) for d in return_entries: - update_outstanding_amt(d.debit_to, "Customer", d.customer, "Sales Invoice", d.return_against) \ No newline at end of file + update_outstanding_amt(d.debit_to, "Customer", d.customer, "Sales Invoice", d.return_against)