Skip to content

Commit

Permalink
fix: Update pacthes.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 authored Oct 12, 2021
1 parent 076c83c commit 64f92fe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@


def execute():
frappe.reload_doctype("TaxJar Settings", force=True)
frappe.reload_doctype("Product Tax Category", force=True)

company = frappe.get_all('Company', filters = {'country': 'United States'}, fields=['name'])
if not company:
return

frappe.reload_doctype("TaxJar Settings", force=True)


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

frappe.reload_doctype("Product Tax Category")

custom_fields = {
'Sales Invoice Item': [
dict(fieldname='product_tax_category', fieldtype='Link', insert_after='description', options='Product Tax Category',
Expand Down

0 comments on commit 64f92fe

Please sign in to comment.