mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
change EXCHANGE RATE to a dict, use for memoisation
This commit is contained in:
@@ -9,8 +9,7 @@ from frappe.utils import getdate, cstr, flt, cint, nowdate
|
|||||||
from frappe import _, _dict
|
from frappe import _, _dict
|
||||||
from erpnext.accounts.utils import get_account_currency
|
from erpnext.accounts.utils import get_account_currency
|
||||||
|
|
||||||
EXCHANGE_RATE = frappe.get_list(
|
EXCHANGE_RATE = {}
|
||||||
'Currency Exchange', fields=['date', 'from_currency', 'to_currency', 'exchange_rate'])
|
|
||||||
|
|
||||||
P_OR_L_ACCOUNTS = list(
|
P_OR_L_ACCOUNTS = list(
|
||||||
sum(frappe.get_list('Account', fields=['account_name'], or_filters=[{'root_type': 'Income'}, {'root_type': 'Expense'}], as_list=True), ())
|
sum(frappe.get_list('Account', fields=['account_name'], or_filters=[{'root_type': 'Income'}, {'root_type': 'Expense'}], as_list=True), ())
|
||||||
|
|||||||
Reference in New Issue
Block a user