codacy fix
diff --git a/erpnext/buying/page/purchase_analytics/purchase_analytics.js b/erpnext/buying/page/purchase_analytics/purchase_analytics.js
index b503113..06764a3 100644
--- a/erpnext/buying/page/purchase_analytics/purchase_analytics.js
+++ b/erpnext/buying/page/purchase_analytics/purchase_analytics.js
@@ -130,14 +130,15 @@
 
 
 		if(!this.data || me.item_type != me.tree_type) {
+			var items;
 			if(me.tree_type=='Supplier') {
-				var items = frappe.report_dump.data["Supplier"];
-			} if(me.tree_type=='Supplier Group') {
-				var items = this.prepare_tree("Supplier", "Supplier Group");
+				items = frappe.report_dump.data["Supplier"];
+			} else if(me.tree_type=='Supplier Group') {
+				items = this.prepare_tree("Supplier", "Supplier Group");
 			} else if(me.tree_type=="Item Group") {
-				var items = this.prepare_tree("Item", "Item Group");
+				items = this.prepare_tree("Item", "Item Group");
 			} else if(me.tree_type=="Item") {
-				var items = frappe.report_dump.data["Item"];
+				items = frappe.report_dump.data["Item"];
 			}
 
 			me.item_type = me.tree_type
diff --git a/erpnext/setup/doctype/supplier_group/supplier_group.js b/erpnext/setup/doctype/supplier_group/supplier_group.js
index ea92726..ac5bda6 100644
--- a/erpnext/setup/doctype/supplier_group/supplier_group.js
+++ b/erpnext/setup/doctype/supplier_group/supplier_group.js
@@ -4,7 +4,7 @@
 cur_frm.cscript.refresh = function(doc) {
 	cur_frm.set_intro(doc.__islocal ? "" : __("There is nothing to edit."));
 	cur_frm.cscript.set_root_readonly(doc);
-}
+};
 
 cur_frm.cscript.set_root_readonly = function(doc) {
 	// read-only for root customer group
@@ -14,16 +14,16 @@
 	} else {
 		cur_frm.set_intro(null);
 	}
-}
+};
 
-//get query select Customer Group
-cur_frm.fields_dict['parent_supplier_group'].get_query = function(doc,cdt,cdn) {
+// get query select Customer Group
+cur_frm.fields_dict['parent_supplier_group'].get_query = function() {
 	return {
 		filters: {
 			'is_group': 1
 		}
-	}
-}
+	};
+};
 
 cur_frm.fields_dict['accounts'].grid.get_field('account').get_query = function(doc, cdt, cdn) {
 	var d  = locals[cdt][cdn];
@@ -33,5 +33,5 @@
 			'company': d.company,
 			"is_group": 0
 		}
-	}
-}
+	};
+};
diff --git a/erpnext/setup/doctype/supplier_group/supplier_group_tree.js b/erpnext/setup/doctype/supplier_group/supplier_group_tree.js
index 24328bd..7392699 100644
--- a/erpnext/setup/doctype/supplier_group/supplier_group_tree.js
+++ b/erpnext/setup/doctype/supplier_group/supplier_group_tree.js
@@ -1,3 +1,3 @@
 frappe.treeview_settings["Supplier Group"] = {
 	ignore_fields:["parent_supplier_group"]
-}
\ No newline at end of file
+};
\ No newline at end of file