diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 727e34507c..a1e30b66e9 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -228,7 +228,6 @@ erpnext.patches.v13_0.migrate_stripe_api erpnext.patches.v13_0.reset_clearance_date_for_intracompany_payment_entries execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings") execute:frappe.reload_doc("erpnext_integrations", "doctype", "Product Tax Category") -erpnext.patches.v13_0.custom_fields_for_taxjar_integration #08-11-2021 erpnext.patches.v13_0.set_operation_time_based_on_operating_cost erpnext.patches.v13_0.create_gst_payment_entry_fields #27-11-2021 erpnext.patches.v13_0.fix_invoice_statuses diff --git a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py deleted file mode 100644 index 5cbd0b5fcb..0000000000 --- a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py +++ /dev/null @@ -1,72 +0,0 @@ -import frappe -from frappe.custom.doctype.custom_field.custom_field import create_custom_fields - -from erpnext.erpnext_integrations.doctype.taxjar_settings.taxjar_settings import add_permissions - - -def execute(): - company = frappe.get_all("Company", filters={"country": "United States"}, fields=["name"]) - if not company: - return - - TAXJAR_CREATE_TRANSACTIONS = frappe.db.get_single_value( - "TaxJar Settings", "taxjar_create_transactions" - ) - TAXJAR_CALCULATE_TAX = frappe.db.get_single_value("TaxJar Settings", "taxjar_calculate_tax") - TAXJAR_SANDBOX_MODE = frappe.db.get_single_value("TaxJar Settings", "is_sandbox") - - if not TAXJAR_CREATE_TRANSACTIONS and not TAXJAR_CALCULATE_TAX and not TAXJAR_SANDBOX_MODE: - return - - custom_fields = { - "Sales Invoice Item": [ - dict( - fieldname="product_tax_category", - fieldtype="Link", - insert_after="description", - options="Product Tax Category", - label="Product Tax Category", - fetch_from="item_code.product_tax_category", - ), - dict( - fieldname="tax_collectable", - fieldtype="Currency", - insert_after="net_amount", - label="Tax Collectable", - read_only=1, - options="currency", - ), - dict( - fieldname="taxable_amount", - fieldtype="Currency", - insert_after="tax_collectable", - label="Taxable Amount", - read_only=1, - options="currency", - ), - ], - "Item": [ - dict( - fieldname="product_tax_category", - fieldtype="Link", - insert_after="item_group", - options="Product Tax Category", - label="Product Tax Category", - ) - ], - "TaxJar Settings": [ - dict( - fieldname="company", - fieldtype="Link", - insert_after="configuration", - options="Company", - label="Company", - ) - ], - } - create_custom_fields(custom_fields, update=True) - add_permissions() - frappe.enqueue( - "erpnext.erpnext_integrations.doctype.taxjar_settings.taxjar_settings.add_product_tax_categories", - now=True, - )