fix: Patch

This commit is contained in:
Deepesh Garg 2021-07-28 15:30:05 +05:30
parent 9350249941
commit fa8e6ac7cd

View File

@ -1,7 +1,8 @@
import frappe
def execute():
if frappe.db.has_column("Tax Withholding Category", "round_off_tax_amount"):
if frappe.db.has_table("Tax Withholding Category") \
and frappe.db.has_column("Tax Withholding Category", "round_off_tax_amount"):
frappe.db.sql("""
UPDATE `tabTax Withholding Category` set round_off_tax_amount = 0
WHERE round_off_tax_amount IS NULL