From 8a13ddc2f2be2e4ad465e85d41e76f78167cd71f Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Wed, 29 Jun 2022 12:28:24 -0400 Subject: [PATCH] fix: gain/loss can be income or expense --- erpnext/setup/doctype/company/company.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index 0de5b2d5a32..3dec303a926 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -219,8 +219,8 @@ erpnext.company.setup_queries = function(frm) { ["default_discount_account", {}], ["discount_allowed_account", {"root_type": "Expense"}], ["discount_received_account", {"root_type": "Income"}], - ["exchange_gain_loss_account", {"root_type": "Expense"}], - ["unrealized_exchange_gain_loss_account", {"root_type": "Expense"}], + ["exchange_gain_loss_account", {"root_type": ["in", ["Expense", "Income"]]}], + ["unrealized_exchange_gain_loss_account", {"root_type": ["in", ["Expense", "Income"]]}], ["accumulated_depreciation_account", {"root_type": "Asset", "account_type": "Accumulated Depreciation"}], ["depreciation_expense_account", {"root_type": "Expense", "account_type": "Depreciation"}],