fix: validate company in taxes setup
This commit is contained in:
parent
477a90e2ac
commit
46d39d27aa
@ -11,6 +11,9 @@ from frappe import _
|
||||
|
||||
|
||||
def setup_taxes_and_charges(company_name: str, country: str):
|
||||
if not frappe.db.exists('Company', company_name):
|
||||
frappe.throw(_('Company {} does not exist yet. Taxes setup aborted.').format(company_name))
|
||||
|
||||
file_path = os.path.join(os.path.dirname(__file__), '..', 'data', 'country_wise_tax.json')
|
||||
with open(file_path, 'r') as json_file:
|
||||
tax_data = json.load(json_file)
|
||||
|
Loading…
Reference in New Issue
Block a user