# Copyright (c) 2020, Xhiveframework and Contributors
# License: GNU General Public License v3. See license.txt

import xhiveframework

from xhiveerp.regional.south_africa.setup import add_permissions, make_custom_fields


def execute():
	company = xhiveframework.get_all("Company", filters={"country": "South Africa"})
	if not company:
		return

	xhiveframework.reload_doc("regional", "doctype", "south_africa_vat_settings")
	xhiveframework.reload_doc("regional", "report", "vat_audit_report")
	xhiveframework.reload_doc("accounts", "doctype", "south_africa_vat_account")

	make_custom_fields()
	add_permissions()
