From ee5ff805e9bdd4c1e7ef3904bc0eb68ec60d3c6e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 3 Aug 2017 17:37:23 +0530 Subject: [PATCH] Book expense included in valuation only if perpetual inventory enabled (#10271) --- 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 e768c2719e..589bc40cd5 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -510,7 +510,7 @@ class PurchaseInvoice(BuyingController): i += 1 - if self.update_stock and valuation_tax: + if self.auto_accounting_for_stock and self.update_stock and valuation_tax: for cost_center, amount in valuation_tax.items(): gl_entries.append( self.get_gl_dict({