Skip to content

Commit

Permalink
fix: set account currency in taxes on setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Jun 9, 2023
1 parent e3802d1 commit c200a1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/setup/setup_wizard/operations/taxes_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import frappe
from frappe import _

from erpnext import get_company_currency


def setup_taxes_and_charges(company_name: str, country: str):
if not frappe.db.exists("Company", company_name):
Expand Down Expand Up @@ -217,6 +219,7 @@ def get_or_create_account(company_name, account):
return frappe.get_doc("Account", existing_accounts[0].name)

tax_group = get_or_create_tax_group(company_name, root_type)
company_currency = get_company_currency(company_name)

account["doctype"] = "Account"
account["company"] = company_name
Expand All @@ -225,6 +228,7 @@ def get_or_create_account(company_name, account):
account["account_type"] = "Tax"
account["root_type"] = root_type
account["is_group"] = 0
account["account_currency"] = company_currency

doc = frappe.get_doc(account)
doc.flags.ignore_links = True
Expand Down

0 comments on commit c200a1f

Please sign in to comment.