[minor] added cache in get_value
This commit is contained in:
@@ -348,8 +348,8 @@ def get_actual_expense(args):
|
||||
def get_currency_precision(currency=None):
|
||||
if not currency:
|
||||
currency = frappe.db.get_value("Company",
|
||||
frappe.db.get_default("company"), "default_currency")
|
||||
currency_format = frappe.db.get_value("Currency", currency, "number_format")
|
||||
frappe.db.get_default("company"), "default_currency", cache=True)
|
||||
currency_format = frappe.db.get_value("Currency", currency, "number_format", cache=True)
|
||||
|
||||
from frappe.utils import get_number_format_info
|
||||
return get_number_format_info(currency_format)[2]
|
||||
|
||||
Reference in New Issue
Block a user