import influxframework


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

	influxframework.reload_doc("regional", "doctype", "lower_deduction_certificate")

	ldc = influxframework.qb.DocType("Lower Deduction Certificate").as_("ldc")
	supplier = influxframework.qb.DocType("Supplier")

	influxframework.qb.update(ldc).inner_join(supplier).on(ldc.supplier == supplier.name).set(
		ldc.tax_withholding_category, supplier.tax_withholding_category
	).where(ldc.tax_withholding_category.isnull()).run()
