mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
perf: use get_cached_value instead of db.get_value in controllers (#32776)
This commit is contained in:
@@ -1056,7 +1056,7 @@ class init_landed_taxes_and_totals(object):
|
||||
company_currency = erpnext.get_company_currency(self.doc.company)
|
||||
for d in self.doc.get(self.tax_field):
|
||||
if not d.account_currency:
|
||||
account_currency = frappe.db.get_value("Account", d.expense_account, "account_currency")
|
||||
account_currency = frappe.get_cached_value("Account", d.expense_account, "account_currency")
|
||||
d.account_currency = account_currency or company_currency
|
||||
|
||||
def set_exchange_rate(self):
|
||||
|
||||
Reference in New Issue
Block a user