mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge pull request #48945 from diptanilsaha/child_company_coa_currency
fix: set default_currency in accounts during child company creation
This commit is contained in:
@@ -18,6 +18,7 @@ def create_charts(
|
|||||||
accounts = []
|
accounts = []
|
||||||
|
|
||||||
def _import_accounts(children, parent, root_type, root_account=False):
|
def _import_accounts(children, parent, root_type, root_account=False):
|
||||||
|
nonlocal custom_chart
|
||||||
for account_name, child in children.items():
|
for account_name, child in children.items():
|
||||||
if root_account:
|
if root_account:
|
||||||
root_type = child.get("root_type")
|
root_type = child.get("root_type")
|
||||||
@@ -55,7 +56,8 @@ def create_charts(
|
|||||||
"account_number": account_number,
|
"account_number": account_number,
|
||||||
"account_type": child.get("account_type"),
|
"account_type": child.get("account_type"),
|
||||||
"account_currency": child.get("account_currency")
|
"account_currency": child.get("account_currency")
|
||||||
or frappe.get_cached_value("Company", company, "default_currency"),
|
if custom_chart
|
||||||
|
else frappe.get_cached_value("Company", company, "default_currency"),
|
||||||
"tax_rate": child.get("tax_rate"),
|
"tax_rate": child.get("tax_rate"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user