fix codacy
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index feee067..83e7916 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -352,10 +352,10 @@
 					if default.company == obj.company:
 						default.income_account = d.income_account
 						income_account_set = True
-				else:
-					if not income_account_set:
-						doc.append("item_defaults", {
-							"company": obj.company,
-							"income_account": d.income_account
-						})
+						break
+				if not income_account_set:
+					doc.append("item_defaults", {
+						"company": obj.company,
+						"income_account": d.income_account
+					})
 				doc.save()
\ No newline at end of file