Update erpnext/erpnext_integrations/taxjar_integration.py

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
This commit is contained in:
Subin Tom 2021-09-16 14:42:15 +05:30 committed by GitHub
parent 435a5e4fa3
commit 11bd42467e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,8 +172,7 @@ def set_sales_tax(doc, method):
return
# check if delivering within a nexus
nexus_list = frappe.get_doc('TaxJar Settings').get("nexus")
if tax_dict["to_state"] not in [nex.region_code for nex in nexus_list]:
if not frappe.db.get_value('TaxJar Nexus List', {'region_code': tax_dict["to_state"]})
return
tax_data = validate_tax_request(tax_dict)