Merge pull request #28656 from nemesis189/taxjar-nexus-display-condition

fix: Taxjar Nexus list visible only if child table is visible
diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json
index 23ccb7e..ae1f36e 100644
--- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json
+++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json
@@ -20,7 +20,6 @@
   "configuration_cb",
   "shipping_account_head",
   "section_break_12",
-  "nexus_address",
   "nexus"
  ],
  "fields": [
@@ -87,16 +86,12 @@
    "fieldtype": "Column Break"
   },
   {
+   "depends_on": "nexus",
    "fieldname": "section_break_12",
    "fieldtype": "Section Break",
    "label": "Nexus List"
   },
   {
-   "fieldname": "nexus_address",
-   "fieldtype": "HTML",
-   "label": "Nexus Address"
-  },
-  {
    "fieldname": "nexus",
    "fieldtype": "Table",
    "label": "Nexus",
@@ -108,19 +103,20 @@
    "fieldtype": "Column Break"
   },
   {
-   "fieldname": "column_break_10",
-   "fieldtype": "Column Break"
-  },
-  {
    "fieldname": "company",
    "fieldtype": "Link",
    "label": "Company",
    "options": "Company"
+  },
+  {
+   "fieldname": "column_break_10",
+   "fieldtype": "Column Break"
   }
  ],
  "issingle": 1,
  "links": [],
- "modified": "2021-11-08 18:02:29.232090",
+ "migration_hash": "8ca1ea3309ed28547b19da8e6e27e96f",
+ "modified": "2021-11-30 11:17:24.647979",
  "modified_by": "Administrator",
  "module": "ERPNext Integrations",
  "name": "TaxJar Settings",
diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py
index b9f24b6..d4bbe88 100644
--- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py
+++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py
@@ -16,9 +16,9 @@
 class TaxJarSettings(Document):
 
 	def on_update(self):
-		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")
+		TAXJAR_CREATE_TRANSACTIONS = self.taxjar_create_transactions
+		TAXJAR_CALCULATE_TAX = self.taxjar_calculate_tax
+		TAXJAR_SANDBOX_MODE = self.is_sandbox
 
 		fields_already_exist = frappe.db.exists('Custom Field', {'dt': ('in', ['Item','Sales Invoice Item']), 'fieldname':'product_tax_category'})
 		fields_hidden = frappe.get_value('Custom Field', {'dt': ('in', ['Sales Invoice Item'])}, 'hidden')