From 839320dca5ae35be9276a0ca080a44d9aa2dc078 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 6 Jul 2018 10:42:15 +0530 Subject: [PATCH] [Fix] Original Invoice outstanding is not updating after making Debit Note (#14821) --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 697611d961..c469a0244e 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -334,7 +334,7 @@ class PurchaseInvoice(BuyingController): if update_outstanding == "No": update_outstanding_amt(self.credit_to, "Supplier", self.supplier, - self.doctype, self.return_against if cint(self.is_return and self.return_against) else self.name) + self.doctype, self.return_against if cint(self.is_return) and self.return_against else self.name) if repost_future_gle and cint(self.update_stock) and self.auto_accounting_for_stock: from erpnext.controllers.stock_controller import update_gl_entries_after