From b1e932a6f8b7a91ddd71818806ad924f7f673fa7 Mon Sep 17 00:00:00 2001 From: Ankush Date: Thu, 29 Jul 2021 19:56:36 +0530 Subject: [PATCH] fix: remove incorrect condition in GLE comparison (#26713) --- erpnext/controllers/stock_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 5370f4c571c..005d069c49a 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -418,7 +418,7 @@ def compare_existing_and_expected_gle(existing_gle, expected_gle): for e in existing_gle: if entry.account == e.account: account_existed = True - if entry.account == e.account and entry.against_account == e.against_account \ + if entry.account == e.account \ and (not entry.cost_center or not e.cost_center or entry.cost_center == e.cost_center) \ and (entry.debit != e.debit or entry.credit != e.credit): matched = False