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

import influxframework

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


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

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

	make_custom_fields()
	add_permissions()
