diff --git a/setup/doctype/sales_person/sales_person.py b/setup/doctype/sales_person/sales_person.py
index 04a40bd..fbcb83e 100644
--- a/setup/doctype/sales_person/sales_person.py
+++ b/setup/doctype/sales_person/sales_person.py
@@ -5,64 +5,60 @@
 from webnotes.model.doclist import getlist
 from webnotes.model.code import get_obj
 from webnotes import session, form, is_testing, msgprint, errprint
-
+from webnotes.utils import flt
 
 sql = webnotes.conn.sql
 convert_to_lists = webnotes.conn.convert_to_lists
 	
 # -----------------------------------------------------------------------------------------
 
-
 class DocType:
-  def __init__(self, doc, doclist=[]):
-    self.doc = doc
-    self.doclist = doclist
-    self.nsm_parent_field = 'parent_sales_person';
-
-  def check_state(self):
-    return "\n" + "\n".join([i[0] for i in sql("select state_name from `tabState` where `tabState`.country='%s' " % self.doc.country)])
+	def __init__(self, doc, doclist=[]):
+		self.doc = doc
+		self.doclist = doclist
+		self.nsm_parent_field = 'parent_sales_person';
+	
+	def check_state(self):
+		return "\n" + "\n".join([i[0] for i in sql("select state_name from `tabState` where `tabState`.country='%s' " % self.doc.country)])
 
 
-  # update Node Set Model
-  def update_nsm_model(self):
-    import webnotes
-    import webnotes.utils.nestedset
-    webnotes.utils.nestedset.update_nsm(self)
+	# update Node Set Model
+	def update_nsm_model(self):
+		import webnotes
+		import webnotes.utils.nestedset
+		webnotes.utils.nestedset.update_nsm(self)
 
-  # ON UPDATE
-  #--------------------------------------
-  def on_update(self):
-    # update nsm
-    self.update_nsm_model()   
+	# ON UPDATE
+	#--------------------------------------
+	def on_update(self):
+		# update nsm
+		self.update_nsm_model()	 
 
 
-  def validate(self): 
-	from webnotes.utils import flt
-    for d in getlist(self.doclist, 'target_details'):
-      if not flt(d.target_qty) and not flt(d.target_amount):
-        msgprint("Either target qty or target amount is mandatory.")
-        raise Exception
-        
-    #self.sync_with_contact()
-    
-  def sync_with_contact(self):
-    cid = sql("select name from tabContact where sales_person_id = %s and is_sales_person=1", self.doc.name)
-    if cid:
-      d = Document('Contact', cid[0][0])
-    else:
-      d = Document('Contact')
-    
-    name_split = self.doc.sales_person_name.split()
-    d.contact_name = self.doc.sales_person_name
-    d.first_name = name_split[0]
-    d.last_name = len(name_split) > 1 and name_split[1] or ''
-    d.email_id = self.doc.email_id
-    d.contact_no = d.mobile_no = self.doc.mobile_no
-    d.designation = self.doc.designation
-    d.department = self.doc.department
-    d.sales_person_id = self.doc.name
-    d.is_sales_person = 1
-    
-    d.save(new = (not d.name))
-    
-    
+	def validate(self): 
+		for d in getlist(self.doclist, 'target_details'):
+			if not flt(d.target_qty) and not flt(d.target_amount):
+				msgprint("Either target qty or target amount is mandatory.")
+				raise Exception
+				
+		#self.sync_with_contact()
+		
+	def sync_with_contact(self):
+		cid = sql("select name from tabContact where sales_person_id = %s and is_sales_person=1", self.doc.name)
+		if cid:
+			d = Document('Contact', cid[0][0])
+		else:
+			d = Document('Contact')
+		
+		name_split = self.doc.sales_person_name.split()
+		d.contact_name = self.doc.sales_person_name
+		d.first_name = name_split[0]
+		d.last_name = len(name_split) > 1 and name_split[1] or ''
+		d.email_id = self.doc.email_id
+		d.contact_no = d.mobile_no = self.doc.mobile_no
+		d.designation = self.doc.designation
+		d.department = self.doc.department
+		d.sales_person_id = self.doc.name
+		d.is_sales_person = 1
+		
+		d.save(new = (not d.name))		
