import xhiveframework

# this patch should have been included with this PR https://github.com/xhiveframework/xhiveerp/pull/14302


def execute():
	if xhiveframework.db.table_exists("Additional Salary Component"):
		if not xhiveframework.db.table_exists("Additional Salary"):
			xhiveframework.rename_doc("DocType", "Additional Salary Component", "Additional Salary")

		xhiveframework.delete_doc("DocType", "Additional Salary Component")
