From 4f8da4c31312d55036c19a160bec069bd3ffd8cd Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 26 Dec 2020 11:37:51 +0530 Subject: [PATCH] fix: Test Cases --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 2 +- .../landed_cost_taxes_and_charges.json | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index c441274908..fc849647d4 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -149,7 +149,7 @@ class GLEntry(Document): account_currency = get_account_currency(self.account) if not self.account_currency: - self.account_currency = company_currency + self.account_currency = account_currency or company_currency if account_currency != self.account_currency: frappe.throw(_("{0} {1}: Accounting Entry for {2} can only be made in currency: {3}") diff --git a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json index 0861224de4..4fcdb4c10c 100644 --- a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json +++ b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.json @@ -41,16 +41,14 @@ "in_list_view": 1, "label": "Expense Account", "mandatory_depends_on": "eval:cint(erpnext.is_perpetual_inventory_enabled(parent.company))", - "options": "Account", - "reqd": 1 + "options": "Account" }, { "fieldname": "account_currency", "fieldtype": "Link", "label": "Account Currency", "options": "Currency", - "read_only": 1, - "reqd": 1 + "read_only": 1 }, { "fieldname": "exchange_rate", @@ -63,14 +61,13 @@ "fieldtype": "Currency", "label": "Base Amount", "options": "Company:company:default_currency", - "read_only": 1, - "reqd": 1 + "read_only": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2020-12-04 00:22:14.373312", + "modified": "2020-12-26 01:07:23.233604", "modified_by": "Administrator", "module": "Stock", "name": "Landed Cost Taxes and Charges",