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


import influxframework


def execute():
	if influxframework.db.table_exists("Bank Reconciliation"):
		influxframework.rename_doc("DocType", "Bank Reconciliation", "Bank Clearance", force=True)
		influxframework.reload_doc("Accounts", "doctype", "Bank Clearance")

		influxframework.rename_doc("DocType", "Bank Reconciliation Detail", "Bank Clearance Detail", force=True)
		influxframework.reload_doc("Accounts", "doctype", "Bank Clearance Detail")
