"""Remove the VAT calculation Client Script that was moved into the doctype JS.

The column calculations for "Declaration of value added tax" now live in
declaration_of_value_added_tax.js (version-controlled), so the DB Client Script
is redundant — keeping it would recompute twice. Row-creation scripts and the
Formula Editor script stay as Client Scripts and are NOT touched here.

Removing the entry from the client_script.json fixture does NOT delete it on
other environments (fixture import is upsert, never delete), so this patch
deletes it explicitly. Idempotent: a no-op once it is gone.
"""

import frappe

MOVED = [
	"Declaration of value added tax VERIFIED CALC",
]


def execute():
	if not frappe.db.exists("DocType", "Client Script"):
		return

	for name in MOVED:
		if frappe.db.exists("Client Script", name):
			frappe.delete_doc("Client Script", name, force=1, ignore_permissions=True)
