From 577a7fe01d7ed0d69b54fcfa605ee6104b5a10bc Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 14 Oct 2020 15:44:30 +0530 Subject: [PATCH] fix: stock & account balance difference in fraction (#23635) --- erpnext/accounts/general_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index c12e006d2b..9a091bf57b 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -171,7 +171,7 @@ def validate_account_for_perpetual_inventory(gl_map): frappe.throw(_("Account: {0} can only be updated via Stock Transactions") .format(account), StockAccountInvalidTransaction) - elif account_bal != stock_bal: + elif abs(account_bal - stock_bal) > 0.1: precision = get_field_precision(frappe.get_meta("GL Entry").get_field("debit"), currency=frappe.get_cached_value('Company', gl_map[0].company, "default_currency"))